From 9ebc62de0e41f6266163901d1c0e3c72c0cc456c Mon Sep 17 00:00:00 2001 From: Brad Swenson Date: Thu, 21 Apr 2022 21:17:32 -0500 Subject: [PATCH 1/3] support slo filter for notification_policy --- cloudflare/schema_cloudflare_notification_policy.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cloudflare/schema_cloudflare_notification_policy.go b/cloudflare/schema_cloudflare_notification_policy.go index 7af0e99527..4eea8561ea 100644 --- a/cloudflare/schema_cloudflare_notification_policy.go +++ b/cloudflare/schema_cloudflare_notification_policy.go @@ -125,6 +125,13 @@ func notificationPolicyFilterSchema() *schema.Schema { Optional: true, RequiredWith: []string{"filters.0.enabled"}, }, + "slo": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Optional: true, + }, }, }, } From 0715ff61a3fe35c140b1c7e5a46a4319df1d3dbc Mon Sep 17 00:00:00 2001 From: Brad Swenson Date: Thu, 21 Apr 2022 21:20:10 -0500 Subject: [PATCH 2/3] add changelog --- .changelog/1573.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/1573.txt diff --git a/.changelog/1573.txt b/.changelog/1573.txt new file mode 100644 index 0000000000..055faf281e --- /dev/null +++ b/.changelog/1573.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/cloudflare_notification_policy: Add `slo` to notification policy filters +``` From 4c7e1746e7c6d3f4df35cfeac0e487227ec04fe9 Mon Sep 17 00:00:00 2001 From: Brad Swenson Date: Thu, 21 Apr 2022 21:40:36 -0500 Subject: [PATCH 3/3] update notification_policy documentation --- website/docs/r/notification_policy.html.markdown | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/website/docs/r/notification_policy.html.markdown b/website/docs/r/notification_policy.html.markdown index 64c417b341..7e83c185cb 100644 --- a/website/docs/r/notification_policy.html.markdown +++ b/website/docs/r/notification_policy.html.markdown @@ -89,6 +89,7 @@ The following arguments are supported: * `real_origin_monitoring` - (Optional) Cloudflare is unable to reach your origin (refer to the [nested schema](#nestedblock--alert-type-real-origin-monitoring)). * `universal_ssl_event_type` - (Optional) Universal certificate notices (refer to the [nested schema](#nestedblock--alert-type-universal-ssl-event-type)). * `bgp_hijack_notification` - (Optional) Alerts for BGP hijack (refer to the [nested schema](#nestedblock--alert-type-bgp-hijack-notification)). +* `http_alert_origin_error` - (Optional) HTTP origin error rate alert (refer to the [nested schema](#nestedblock--alert-type-http-alert-origin-error)). **Nested schema for `billing_usage_alert`** @@ -117,6 +118,13 @@ The following arguments are supported: **Nested schema for `bgp_hijack_notification`** + +**Nested schema for `http_alert_origin_error`** + +* `zones` - (Optional) A list of zone identifiers. +* `slo` - (Optional) A numerical limit. Example: `"99.9"` + + ## Import An existing notification policy can be imported using the account ID and the policy ID