From c3c22a3c273752aed36b377286a8ebe6946392f0 Mon Sep 17 00:00:00 2001 From: Josip Stanic Date: Tue, 23 Apr 2024 16:26:52 +0200 Subject: [PATCH 1/2] resource/cloudflare_notification_policy: add 'target_ip' attribute to 'filter' nested block to support 'advanced_ddos_attack_l4_alert' policies with filters. --- docs/resources/notification_policy.md | 1 + .../schema_cloudflare_notification_policy.go | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/docs/resources/notification_policy.md b/docs/resources/notification_policy.md index 7328cf6016..ba66f92e0f 100644 --- a/docs/resources/notification_policy.md +++ b/docs/resources/notification_policy.md @@ -131,6 +131,7 @@ Optional: - `slo` (Set of String) A numerical limit. Example: `99.9`. - `status` (Set of String) Status to alert on. - `target_hostname` (Set of String) Target host to alert on for dos. +- `target_ip` (Set of String) Target ip to alert on for dos in CIDR notation. - `target_zone_name` (Set of String) Target domain to alert on. - `tunnel_id` (Set of String) Tunnel IDs to alert on. - `where` (Set of String) Filter for alert. diff --git a/internal/sdkv2provider/schema_cloudflare_notification_policy.go b/internal/sdkv2provider/schema_cloudflare_notification_policy.go index 6227124bde..40f1fb345f 100644 --- a/internal/sdkv2provider/schema_cloudflare_notification_policy.go +++ b/internal/sdkv2provider/schema_cloudflare_notification_policy.go @@ -386,6 +386,14 @@ func notificationPolicyFilterSchema() *schema.Schema { Optional: true, Description: "Target host to alert on for dos.", }, + "target_ip": { + Type: schema.TypeSet, + Elem: &schema.Schema{ + Type: schema.TypeString, + }, + Optional: true, + Description: "Target ip to alert on for dos in CIDR notation.", + }, "packets_per_second": { Type: schema.TypeSet, Elem: &schema.Schema{ From 8e6b0439e8f1aa2ba76639827094c62ee1897fe6 Mon Sep 17 00:00:00 2001 From: Josip Stanic Date: Tue, 23 Apr 2024 16:34:36 +0200 Subject: [PATCH 2/2] resource/cloudflare_notification_policy: add 'target_ip' attribute to 'filter' nested block to support 'advanced_ddos_attack_l4_alert' policies with filters. --- .changelog/3263.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/3263.txt diff --git a/.changelog/3263.txt b/.changelog/3263.txt new file mode 100644 index 0000000000..9b8f81495d --- /dev/null +++ b/.changelog/3263.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/cloudflare_notification_policy: add 'target_ip' atrribute to 'filter' nested block +``` \ No newline at end of file