-
Notifications
You must be signed in to change notification settings - Fork 807
Description
Confirmation
- This is a bug with an existing resource and is not a feature request or enhancement. Feature requests should be submitted with Cloudflare Support or your account team.
- I have searched the issue tracker and my issue isn't already found.
- I have replicated my issue using the latest version of the provider and it is still present.
Terraform and Cloudflare provider version
OpenTofu v1.10.8
on linux_amd64
- provider registry.opentofu.org/cloudflare/cloudflare v5.18.0
Affected resource(s)
cloudflare_notification_policy
Terraform configuration files
resource "cloudflare_notification_policy" "cni_maintenance" {
account_id = "id"
alert_type = "cni_maintenance_notification"
name = "CNI maintenance"
enabled = true
mechanisms = {
email = [
{ id = "email" },
]
}
}Link to debug output
N/A
Panic output
No response
Expected output
N/A
Actual output
│ Error: Invalid Attribute Value Match
│
│ with cloudflare_notification_policy.cni_maintenance,
│ on notifications.tf line 538, in resource "cloudflare_notification_policy" "cni_maintenance":
│ 538: alert_type = "cni_maintenance_notification"
│
│ Attribute alert_type value must be one of: ["abuse_report_alert" "access_custom_certificate_expiration_type"
│ "advanced_ddos_attack_l4_alert" "advanced_ddos_attack_l7_alert" "advanced_http_alert_error" "bgp_hijack_notification"
│ "billing_usage_alert" "block_notification_block_removed" "block_notification_new_block"
│ "block_notification_review_rejected" "bot_traffic_basic_alert" "brand_protection_alert" "brand_protection_digest"
│ "clickhouse_alert_fw_anomaly" "clickhouse_alert_fw_ent_anomaly" "cloudforce_one_request_notification" "custom_analytics"
│ "custom_bot_detection_alert" "custom_ssl_certificate_event_type" "dedicated_ssl_certificate_event_type"
│ "device_connectivity_anomaly_alert" "dos_attack_l4" "dos_attack_l7" "expiring_service_token_alert"
│ "failing_logpush_job_disabled_alert" "fbm_auto_advertisement" "fbm_dosd_attack" "fbm_volumetric_attack"
│ "health_check_status_notification" "hostname_aop_custom_certificate_expiration_type" "http_alert_edge_error"
│ "http_alert_origin_error" "image_notification" "image_resizing_notification" "incident_alert"
│ "load_balancing_health_alert" "load_balancing_pool_enablement_alert" "logo_match_alert"
│ "magic_tunnel_health_check_event" "magic_wan_tunnel_health" "maintenance_event_notification"
│ "mtls_certificate_store_certificate_expiration_type" "pages_event_alert" "radar_notification" "real_origin_monitoring"
│ "scriptmonitor_alert_new_code_change_detections" "scriptmonitor_alert_new_hosts"
│ "scriptmonitor_alert_new_malicious_hosts" "scriptmonitor_alert_new_malicious_scripts"
│ "scriptmonitor_alert_new_malicious_url" "scriptmonitor_alert_new_max_length_resource_url"
│ "scriptmonitor_alert_new_resources" "secondary_dns_all_primaries_failing" "secondary_dns_primaries_failing"
│ "secondary_dns_warning" "secondary_dns_zone_successfully_updated" "secondary_dns_zone_validation_warning"
│ "security_insights_alert" "sentinel_alert" "stream_live_notifications" "synthetic_test_latency_alert"
│ "synthetic_test_low_availability_alert" "traffic_anomalies_alert" "tunnel_health_event" "tunnel_update_event"
│ "universal_ssl_event_type" "web_analytics_metrics_update" "zone_aop_custom_certificate_expiration_type"], got:
│ "cni_maintenance_notification"
Steps to reproduce
N/A
Additional factoids
The OpenAPI spec the terraform schema is generated from also appears to be missing this value.
References
terraform-provider-cloudflare/internal/services/notification_policy/schema.go
Lines 37 to 112 in 6f187f6
| "alert_type": schema.StringAttribute{ | |
| Description: "Refers to which event will trigger a Notification dispatch. You can use the endpoint to get available alert types which then will give you a list of possible values.\nAvailable values: \"abuse_report_alert\", \"access_custom_certificate_expiration_type\", \"advanced_ddos_attack_l4_alert\", \"advanced_ddos_attack_l7_alert\", \"advanced_http_alert_error\", \"bgp_hijack_notification\", \"billing_usage_alert\", \"block_notification_block_removed\", \"block_notification_new_block\", \"block_notification_review_rejected\", \"bot_traffic_basic_alert\", \"brand_protection_alert\", \"brand_protection_digest\", \"clickhouse_alert_fw_anomaly\", \"clickhouse_alert_fw_ent_anomaly\", \"cloudforce_one_request_notification\", \"custom_analytics\", \"custom_bot_detection_alert\", \"custom_ssl_certificate_event_type\", \"dedicated_ssl_certificate_event_type\", \"device_connectivity_anomaly_alert\", \"dos_attack_l4\", \"dos_attack_l7\", \"expiring_service_token_alert\", \"failing_logpush_job_disabled_alert\", \"fbm_auto_advertisement\", \"fbm_dosd_attack\", \"fbm_volumetric_attack\", \"health_check_status_notification\", \"hostname_aop_custom_certificate_expiration_type\", \"http_alert_edge_error\", \"http_alert_origin_error\", \"image_notification\", \"image_resizing_notification\", \"incident_alert\", \"load_balancing_health_alert\", \"load_balancing_pool_enablement_alert\", \"logo_match_alert\", \"magic_tunnel_health_check_event\", \"magic_wan_tunnel_health\", \"maintenance_event_notification\", \"mtls_certificate_store_certificate_expiration_type\", \"pages_event_alert\", \"radar_notification\", \"real_origin_monitoring\", \"scriptmonitor_alert_new_code_change_detections\", \"scriptmonitor_alert_new_hosts\", \"scriptmonitor_alert_new_malicious_hosts\", \"scriptmonitor_alert_new_malicious_scripts\", \"scriptmonitor_alert_new_malicious_url\", \"scriptmonitor_alert_new_max_length_resource_url\", \"scriptmonitor_alert_new_resources\", \"secondary_dns_all_primaries_failing\", \"secondary_dns_primaries_failing\", \"secondary_dns_warning\", \"secondary_dns_zone_successfully_updated\", \"secondary_dns_zone_validation_warning\", \"security_insights_alert\", \"sentinel_alert\", \"stream_live_notifications\", \"synthetic_test_latency_alert\", \"synthetic_test_low_availability_alert\", \"traffic_anomalies_alert\", \"tunnel_health_event\", \"tunnel_update_event\", \"universal_ssl_event_type\", \"web_analytics_metrics_update\", \"zone_aop_custom_certificate_expiration_type\".", | |
| Required: true, | |
| Validators: []validator.String{ | |
| stringvalidator.OneOfCaseInsensitive( | |
| "abuse_report_alert", | |
| "access_custom_certificate_expiration_type", | |
| "advanced_ddos_attack_l4_alert", | |
| "advanced_ddos_attack_l7_alert", | |
| "advanced_http_alert_error", | |
| "bgp_hijack_notification", | |
| "billing_usage_alert", | |
| "block_notification_block_removed", | |
| "block_notification_new_block", | |
| "block_notification_review_rejected", | |
| "bot_traffic_basic_alert", | |
| "brand_protection_alert", | |
| "brand_protection_digest", | |
| "clickhouse_alert_fw_anomaly", | |
| "clickhouse_alert_fw_ent_anomaly", | |
| "cloudforce_one_request_notification", | |
| "custom_analytics", | |
| "custom_bot_detection_alert", | |
| "custom_ssl_certificate_event_type", | |
| "dedicated_ssl_certificate_event_type", | |
| "device_connectivity_anomaly_alert", | |
| "dos_attack_l4", | |
| "dos_attack_l7", | |
| "expiring_service_token_alert", | |
| "failing_logpush_job_disabled_alert", | |
| "fbm_auto_advertisement", | |
| "fbm_dosd_attack", | |
| "fbm_volumetric_attack", | |
| "health_check_status_notification", | |
| "hostname_aop_custom_certificate_expiration_type", | |
| "http_alert_edge_error", | |
| "http_alert_origin_error", | |
| "image_notification", | |
| "image_resizing_notification", | |
| "incident_alert", | |
| "load_balancing_health_alert", | |
| "load_balancing_pool_enablement_alert", | |
| "logo_match_alert", | |
| "magic_tunnel_health_check_event", | |
| "magic_wan_tunnel_health", | |
| "maintenance_event_notification", | |
| "mtls_certificate_store_certificate_expiration_type", | |
| "pages_event_alert", | |
| "radar_notification", | |
| "real_origin_monitoring", | |
| "scriptmonitor_alert_new_code_change_detections", | |
| "scriptmonitor_alert_new_hosts", | |
| "scriptmonitor_alert_new_malicious_hosts", | |
| "scriptmonitor_alert_new_malicious_scripts", | |
| "scriptmonitor_alert_new_malicious_url", | |
| "scriptmonitor_alert_new_max_length_resource_url", | |
| "scriptmonitor_alert_new_resources", | |
| "secondary_dns_all_primaries_failing", | |
| "secondary_dns_primaries_failing", | |
| "secondary_dns_warning", | |
| "secondary_dns_zone_successfully_updated", | |
| "secondary_dns_zone_validation_warning", | |
| "security_insights_alert", | |
| "sentinel_alert", | |
| "stream_live_notifications", | |
| "synthetic_test_latency_alert", | |
| "synthetic_test_low_availability_alert", | |
| "traffic_anomalies_alert", | |
| "tunnel_health_event", | |
| "tunnel_update_event", | |
| "universal_ssl_event_type", | |
| "web_analytics_metrics_update", | |
| "zone_aop_custom_certificate_expiration_type", | |
| ), | |
| }, | |
| }, |