From 5ffd234d98a49c7a12a5371cad6c1eebcb590d68 Mon Sep 17 00:00:00 2001 From: atsushii Date: Tue, 9 May 2023 21:21:09 +0800 Subject: [PATCH 1/5] fix: unexpected crashes when setting target_host_name with a filters attribute --- .changelog/2425.txt | 3 +++ .../sdkv2provider/schema_cloudflare_notification_policy.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .changelog/2425.txt diff --git a/.changelog/2425.txt b/.changelog/2425.txt new file mode 100644 index 0000000000..719f223263 --- /dev/null +++ b/.changelog/2425.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/cloudflare_notification_policy: Fix unexpected crashes when setting target_host_name with a filters attribute +``` diff --git a/internal/sdkv2provider/schema_cloudflare_notification_policy.go b/internal/sdkv2provider/schema_cloudflare_notification_policy.go index 3beb56f088..d30b47077a 100644 --- a/internal/sdkv2provider/schema_cloudflare_notification_policy.go +++ b/internal/sdkv2provider/schema_cloudflare_notification_policy.go @@ -267,7 +267,7 @@ func notificationPolicyFilterSchema() *schema.Schema { Optional: true, Description: "Target domain to alert on.", }, - "target_host": { + "target_host_name": { Type: schema.TypeSet, Elem: &schema.Schema{ Type: schema.TypeString, From 1bbbcdce288475b3b6d45efff06ea945c569b887 Mon Sep 17 00:00:00 2001 From: atsushii Date: Tue, 9 May 2023 21:22:08 +0800 Subject: [PATCH 2/5] doc: add target_host_name --- docs/resources/notification_policy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/resources/notification_policy.md b/docs/resources/notification_policy.md index 198527c258..052503d863 100644 --- a/docs/resources/notification_policy.md +++ b/docs/resources/notification_policy.md @@ -119,7 +119,7 @@ Optional: - `services` (Set of String) - `slo` (Set of String) A numerical limit. Example: `99.9`. - `status` (Set of String) Status to alert on. -- `target_host` (Set of String) Target host to alert on for dos. +- `target_host_name` (Set of String) Target host to alert on for dos. - `target_zone_name` (Set of String) Target domain to alert on. - `zones` (Set of String) A list of zone identifiers. From 602ccd0256825fb2724e49ec9aca5ee23577c59d Mon Sep 17 00:00:00 2001 From: atsushii Date: Tue, 9 May 2023 21:27:57 +0800 Subject: [PATCH 3/5] fix: target_host_name to target_hostname --- internal/sdkv2provider/schema_cloudflare_notification_policy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/sdkv2provider/schema_cloudflare_notification_policy.go b/internal/sdkv2provider/schema_cloudflare_notification_policy.go index d30b47077a..fee2b15f24 100644 --- a/internal/sdkv2provider/schema_cloudflare_notification_policy.go +++ b/internal/sdkv2provider/schema_cloudflare_notification_policy.go @@ -267,7 +267,7 @@ func notificationPolicyFilterSchema() *schema.Schema { Optional: true, Description: "Target domain to alert on.", }, - "target_host_name": { + "target_hostname": { Type: schema.TypeSet, Elem: &schema.Schema{ Type: schema.TypeString, From 751bbd1c36cea0a19428bfc98fc58f8afa29b1a1 Mon Sep 17 00:00:00 2001 From: atsushii Date: Tue, 9 May 2023 21:28:23 +0800 Subject: [PATCH 4/5] fix: target_host_name to target_hostname --- .changelog/2425.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changelog/2425.txt b/.changelog/2425.txt index 719f223263..e58e4d9c75 100644 --- a/.changelog/2425.txt +++ b/.changelog/2425.txt @@ -1,3 +1,3 @@ ```release-note:bug -resource/cloudflare_notification_policy: Fix unexpected crashes when setting target_host_name with a filters attribute +resource/cloudflare_notification_policy: Fix unexpected crashes when setting target_hostname with a filters attribute ``` From 99bc8cc480c7ebb5afc461995f41c522d9c34e66 Mon Sep 17 00:00:00 2001 From: atsushii Date: Tue, 9 May 2023 21:29:40 +0800 Subject: [PATCH 5/5] doc: update --- docs/resources/notification_policy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/resources/notification_policy.md b/docs/resources/notification_policy.md index 052503d863..473c9f9b62 100644 --- a/docs/resources/notification_policy.md +++ b/docs/resources/notification_policy.md @@ -119,7 +119,7 @@ Optional: - `services` (Set of String) - `slo` (Set of String) A numerical limit. Example: `99.9`. - `status` (Set of String) Status to alert on. -- `target_host_name` (Set of String) Target host to alert on for dos. +- `target_hostname` (Set of String) Target host to alert on for dos. - `target_zone_name` (Set of String) Target domain to alert on. - `zones` (Set of String) A list of zone identifiers.