Skip to content

Commit

Permalink
fix escaping for label (#261)
Browse files Browse the repository at this point in the history
Signed-off-by: Kenny Leung <kleung@chainguard.dev>
  • Loading branch information
k4leung4 committed Apr 11, 2024
1 parent c85e1ad commit 876a352
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion modules/audit-serviceaccount/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ resource "google_monitoring_alert_policy" "generate-access-token" {
label_extractors = {
"email" = "EXTRACT(protoPayload.authenticationInfo.principalEmail)"
"method_name" = "EXTRACT(protoPayload.methodName)"
"user_agent" = "REGEXP_EXTRACT(protoPayload.requestMetadata.callerSuppliedUserAgent, '(\\S+)')"
"user_agent" = "REGEXP_EXTRACT(protoPayload.requestMetadata.callerSuppliedUserAgent, \"(\\\\S+)\")"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/cloudevent-recorder/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ resource "google_monitoring_alert_policy" "bucket-access" {
label_extractors = {
"email" = "EXTRACT(protoPayload.authenticationInfo.principalEmail)"
"method_name" = "EXTRACT(protoPayload.methodName)"
"user_agent" = "REGEXP_EXTRACT(protoPayload.requestMetadata.callerSuppliedUserAgent, '(\\S+)')"
"user_agent" = "REGEXP_EXTRACT(protoPayload.requestMetadata.callerSuppliedUserAgent, \"(\\\\S+)\")"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/configmap/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ resource "google_monitoring_alert_policy" "anomalous-secret-access" {
label_extractors = {
"email" = "EXTRACT(protoPayload.authenticationInfo.principalEmail)"
"method_name" = "EXTRACT(protoPayload.methodName)"
"user_agent" = "REGEXP_EXTRACT(protoPayload.requestMetadata.callerSuppliedUserAgent, '(\\S+)')"
"user_agent" = "REGEXP_EXTRACT(protoPayload.requestMetadata.callerSuppliedUserAgent, \"(\\\\S+)\")"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions modules/cron/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ resource "google_monitoring_alert_policy" "anomalous-job-access" {
label_extractors = {
"email" = "EXTRACT(protoPayload.authenticationInfo.principalEmail)"
"method_name" = "EXTRACT(protoPayload.methodName)"
"user_agent" = "REGEXP_EXTRACT(protoPayload.requestMetadata.callerSuppliedUserAgent, '(\\S+)')"
"user_agent" = "REGEXP_EXTRACT(protoPayload.requestMetadata.callerSuppliedUserAgent, \"(\\\\S+)\")"
}
}
}
Expand Down Expand Up @@ -306,7 +306,7 @@ resource "google_monitoring_alert_policy" "anomalous-job-execution" {
label_extractors = {
"email" = "EXTRACT(protoPayload.authenticationInfo.principalEmail)"
"method_name" = "EXTRACT(protoPayload.methodName)"
"user_agent" = "REGEXP_EXTRACT(protoPayload.requestMetadata.callerSuppliedUserAgent, '(\\S+)')"
"user_agent" = "REGEXP_EXTRACT(protoPayload.requestMetadata.callerSuppliedUserAgent, \"(\\\\S+)\")"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/regional-go-service/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ resource "google_monitoring_alert_policy" "anomalous-service-access" {
label_extractors = {
"email" = "EXTRACT(protoPayload.authenticationInfo.principalEmail)"
"method_name" = "EXTRACT(protoPayload.methodName)"
"user_agent" = "REGEXP_EXTRACT(protoPayload.requestMetadata.callerSuppliedUserAgent, '(\\S+)')"
"user_agent" = "REGEXP_EXTRACT(protoPayload.requestMetadata.callerSuppliedUserAgent, \"(\\\\S+)\")"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/secret/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ resource "google_monitoring_alert_policy" "anomalous-secret-access" {
label_extractors = {
"email" = "EXTRACT(protoPayload.authenticationInfo.principalEmail)"
"method_name" = "EXTRACT(protoPayload.methodName)"
"user_agent" = "REGEXP_EXTRACT(protoPayload.requestMetadata.callerSuppliedUserAgent, '(\\S+)')"
"user_agent" = "REGEXP_EXTRACT(protoPayload.requestMetadata.callerSuppliedUserAgent, \"(\\\\S+)\")"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/serverless-gclb/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ EOT
label_extractors = {
"email" = "EXTRACT(protoPayload.authenticationInfo.principalEmail)"
"method_name" = "EXTRACT(protoPayload.methodName)"
"user_agent" = "REGEXP_EXTRACT(protoPayload.requestMetadata.callerSuppliedUserAgent, '(\\S+)')"
"user_agent" = "REGEXP_EXTRACT(protoPayload.requestMetadata.callerSuppliedUserAgent, \"(\\\\S+)\")"
}
}
}
Expand Down

0 comments on commit 876a352

Please sign in to comment.