diff --git a/.changelog/2425.txt b/.changelog/2425.txt new file mode 100644 index 0000000000..e58e4d9c75 --- /dev/null +++ b/.changelog/2425.txt @@ -0,0 +1,3 @@ +```release-note:bug +resource/cloudflare_notification_policy: Fix unexpected crashes when setting target_hostname with a filters attribute +``` diff --git a/docs/resources/notification_policy.md b/docs/resources/notification_policy.md index 198527c258..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` (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. diff --git a/internal/sdkv2provider/schema_cloudflare_notification_policy.go b/internal/sdkv2provider/schema_cloudflare_notification_policy.go index 3beb56f088..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": { + "target_hostname": { Type: schema.TypeSet, Elem: &schema.Schema{ Type: schema.TypeString,