From 1ea0edad87c97e8c60e8a9f7f88506a9cb6e3561 Mon Sep 17 00:00:00 2001 From: James Edouard Date: Tue, 8 Aug 2023 12:29:45 -0400 Subject: [PATCH] Make condition_prometheus_query_language.evaluation_interval optional (#8564) * Add support for retriggering notifications in AlertPolicy * Add support for forecast options in AlertPolicy * Move tests for forecast alerts into the handwritten file * Add support for PromQL condition type in AlertPolicy * Added test for promql alerts into the handwritten file * Add test for condition_prometheus_query_language.labels * Remove trailing whitespace * Update mmv1/products/monitoring/AlertPolicy.yaml * Make condition_prometheus_query_language.evaluation_interval optional * Remove test for condition_prometheus_query_language.evaluation_interval --------- Co-authored-by: James Edouard Co-authored-by: Cameron Thornton --- mmv1/products/monitoring/AlertPolicy.yaml | 1 - .../terraform/tests/resource_monitoring_alert_policy_test.go | 1 - 2 files changed, 2 deletions(-) diff --git a/mmv1/products/monitoring/AlertPolicy.yaml b/mmv1/products/monitoring/AlertPolicy.yaml index 6d1f9deb45f2..6ec4e791e16f 100644 --- a/mmv1/products/monitoring/AlertPolicy.yaml +++ b/mmv1/products/monitoring/AlertPolicy.yaml @@ -852,7 +852,6 @@ properties: default value is zero. Must be zero or positive. - !ruby/object:Api::Type::String name: evaluationInterval - required: true description: | How often this rule should be evaluated. Must be a positive multiple of 30 seconds or missing. The default value is 30 seconds. If this diff --git a/mmv1/third_party/terraform/tests/resource_monitoring_alert_policy_test.go b/mmv1/third_party/terraform/tests/resource_monitoring_alert_policy_test.go index 5ce46ba0b173..758bdaefe8b7 100644 --- a/mmv1/third_party/terraform/tests/resource_monitoring_alert_policy_test.go +++ b/mmv1/third_party/terraform/tests/resource_monitoring_alert_policy_test.go @@ -430,7 +430,6 @@ resource "google_monitoring_alert_policy" "promql" { condition_prometheus_query_language { query = "vector(1)" duration = "60s" - evaluation_interval = "60s" labels = { "severity" = "page" }