Skip to content

Commit 179fd5c

Browse files
committed
fix: remove unsupported incident.url variable from alert documentation
GCP Cloud Monitoring no longer supports the ${incident.url} variable in alert policy documentation templates — it renders as a literal error: 'Unrecognized variable: incident.url'. Replace with a direct link to the Cloud Logging query for recent errors.
1 parent 999ce4e commit 179fd5c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

infra/monitoring.tf

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,7 @@ resource "google_monitoring_alert_policy" "error_logs_policy" {
9999
content = <<-EOT
100100
## Error detected in Governance Watchdog Cloud Function
101101
102-
**View incident with logs:** $${incident.url}
103-
_(Click "View Logs" in the incident page to see logs around the error time)_
104-
105-
Or view all recent errors: https://console.cloud.google.com/logs/query;query=severity%3E%3DERROR%20AND%20resource.labels.service_name%3D%22${google_cloudfunctions2_function.watchdog_notifications.name}%22
102+
**View recent errors:** https://console.cloud.google.com/logs/query;query=severity%3E%3DERROR%20AND%20resource.labels.service_name%3D%22${google_cloudfunctions2_function.watchdog_notifications.name}%22
106103
EOT
107104
mime_type = "text/markdown"
108105
}

0 commit comments

Comments
 (0)