Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update available notification names #2215

Merged
merged 2 commits into from
Feb 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 23 additions & 0 deletions .changelog/2215.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
```release-note:breaking-change
resource/cloudflare_notification_policy: alert types `block_notification_review_accepted` and `workers_uptime` have been removed.
```

```release-note:breaking-change
resource/cloudflare_notification_policy: alert types `g6_health_alert` has been renamed to `load_balancing_health_alert`
```

```release-note:breaking-change
resource/cloudflare_notification_policy: alert types `g6_pool_toggle_alert` has been renamed to `load_balancing_pool_enablement_alert`
```

```release-note:breaking-change
resource/cloudflare_notification_policy: alert types `scriptmonitor_alert_new_max_length_script_url` has been renamed to `scriptmonitor_alert_new_max_length_resource_url`
```

```release-note:breaking-change
resource/cloudflare_notification_policy: alert types `scriptmonitor_alert_new_scripts` has been renamed to `scriptmonitor_alert_new_resources`
```

```release-note:enhancement
resource/cloudflare_notification_policy: alert types `block_notification_block_removed`, `fbm_dosd_attack`, `scriptmonitor_alert_new_max_length_resource_url`, `scriptmonitor_alert_new_resources`, `tunnel_health_event`, `tunnel_update_event` have been added.
```
2 changes: 1 addition & 1 deletion docs/resources/notification_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ resource "cloudflare_notification_policy" "example" {
### Required

- `account_id` (String) The account identifier to target for the resource.
- `alert_type` (String) The event type that will trigger the dispatch of a notification. See the developer documentation for descriptions of [available alert types](https://developers.cloudflare.com/fundamentals/notifications/notification-available/). Available values: `billing_usage_alert`, `health_check_status_notification`, `g6_pool_toggle_alert`, `real_origin_monitoring`, `universal_ssl_event_type`, `dedicated_ssl_certificate_event_type`, `custom_ssl_certificate_event_type`, `access_custom_certificate_expiration_type`, `zone_aop_custom_certificate_expiration_type`, `bgp_hijack_notification`, `http_alert_origin_error`, `workers_alert`, `weekly_account_overview`, `expiring_service_token_alert`, `secondary_dns_all_primaries_failing`, `secondary_dns_zone_validation_warning`, `secondary_dns_primaries_failing`, `secondary_dns_zone_successfully_updated`, `dos_attack_l7`, `dos_attack_l4`, `advanced_ddos_attack_l7_alert`, `advanced_ddos_attack_l4_alert`, `fbm_volumetric_attack`, `fbm_auto_advertisement`, `load_balancing_pool_enablement_alert`, `load_balancing_health_alert`, `g6_health_alert`, `http_alert_edge_error`, `clickhouse_alert_fw_anomaly`, `clickhouse_alert_fw_ent_anomaly`, `failing_logpush_job_disabled_alert`, `scriptmonitor_alert_new_hosts`, `scriptmonitor_alert_new_scripts`, `scriptmonitor_alert_new_malicious_scripts`, `scriptmonitor_alert_new_malicious_url`, `scriptmonitor_alert_new_code_change_detections`, `scriptmonitor_alert_new_max_length_script_url`, `scriptmonitor_alert_new_malicious_hosts`, `sentinel_alert`, `hostname_aop_custom_certificate_expiration_type`, `stream_live_notifications`, `block_notification_new_block`, `block_notification_review_rejected`, `block_notification_review_accepted`, `web_analytics_metrics_update`, `workers_uptime`.
- `alert_type` (String) The event type that will trigger the dispatch of a notification. See the developer documentation for descriptions of [available alert types](https://developers.cloudflare.com/fundamentals/notifications/notification-available/). Available values: `access_custom_certificate_expiration_type`, `advanced_ddos_attack_l4_alert`, `advanced_ddos_attack_l7_alert`, `bgp_hijack_notification`, `billing_usage_alert`, `block_notification_block_removed`, `block_notification_new_block`, `block_notification_review_rejected`, `clickhouse_alert_fw_anomaly`, `clickhouse_alert_fw_ent_anomaly`, `custom_ssl_certificate_event_type`, `dedicated_ssl_certificate_event_type`, `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`, `load_balancing_health_alert`, `load_balancing_pool_enablement_alert`, `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_zone_successfully_updated`, `secondary_dns_zone_validation_warning`, `sentinel_alert`, `stream_live_notifications`, `tunnel_health_event`, `tunnel_update_event`, `universal_ssl_event_type`, `web_analytics_metrics_update`, `weekly_account_overview`, `workers_alert`, `zone_aop_custom_certificate_expiration_type`.
- `enabled` (Boolean) The status of the notification policy.
- `name` (String) The name of the notification policy.

Expand Down
140 changes: 70 additions & 70 deletions internal/sdkv2provider/schema_cloudflare_notification_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,100 +34,100 @@ func resourceCloudflareNotificationPolicySchema() map[string]*schema.Schema {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice([]string{
"billing_usage_alert",
"health_check_status_notification",
"g6_pool_toggle_alert",
"real_origin_monitoring",
"universal_ssl_event_type",
"dedicated_ssl_certificate_event_type",
"custom_ssl_certificate_event_type",
"access_custom_certificate_expiration_type",
"zone_aop_custom_certificate_expiration_type",
"bgp_hijack_notification",
"http_alert_origin_error",
"workers_alert",
"weekly_account_overview",
"expiring_service_token_alert",
"secondary_dns_all_primaries_failing",
"secondary_dns_zone_validation_warning",
"secondary_dns_primaries_failing",
"secondary_dns_zone_successfully_updated",
"dos_attack_l7",
"dos_attack_l4",
"advanced_ddos_attack_l7_alert",
"advanced_ddos_attack_l4_alert",
"fbm_volumetric_attack",
"fbm_auto_advertisement",
"load_balancing_pool_enablement_alert",
"load_balancing_health_alert",
"g6_health_alert",
"http_alert_edge_error",
"advanced_ddos_attack_l7_alert",
"bgp_hijack_notification",
"billing_usage_alert",
"block_notification_block_removed",
"block_notification_new_block",
"block_notification_review_rejected",
"clickhouse_alert_fw_anomaly",
"clickhouse_alert_fw_ent_anomaly",
"custom_ssl_certificate_event_type",
"dedicated_ssl_certificate_event_type",
"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",
"load_balancing_health_alert",
"load_balancing_pool_enablement_alert",
"real_origin_monitoring",
"scriptmonitor_alert_new_code_change_detections",
"scriptmonitor_alert_new_hosts",
"scriptmonitor_alert_new_scripts",
"scriptmonitor_alert_new_malicious_hosts",
"scriptmonitor_alert_new_malicious_scripts",
"scriptmonitor_alert_new_malicious_url",
"scriptmonitor_alert_new_code_change_detections",
"scriptmonitor_alert_new_max_length_script_url",
"scriptmonitor_alert_new_malicious_hosts",
"scriptmonitor_alert_new_max_length_resource_url",
"scriptmonitor_alert_new_resources",
"secondary_dns_all_primaries_failing",
"secondary_dns_primaries_failing",
"secondary_dns_zone_successfully_updated",
"secondary_dns_zone_validation_warning",
"sentinel_alert",
"hostname_aop_custom_certificate_expiration_type",
"stream_live_notifications",
"block_notification_new_block",
"block_notification_review_rejected",
"block_notification_review_accepted",
"tunnel_health_event",
"tunnel_update_event",
"universal_ssl_event_type",
"web_analytics_metrics_update",
"workers_uptime",
"weekly_account_overview",
"workers_alert",
"zone_aop_custom_certificate_expiration_type",
}, false),
Description: fmt.Sprintf("The event type that will trigger the dispatch of a notification. See the developer documentation for descriptions of [available alert types](https://developers.cloudflare.com/fundamentals/notifications/notification-available/). %s", renderAvailableDocumentationValuesStringSlice([]string{
"billing_usage_alert",
"health_check_status_notification",
"g6_pool_toggle_alert",
"real_origin_monitoring",
"universal_ssl_event_type",
"dedicated_ssl_certificate_event_type",
"custom_ssl_certificate_event_type",
"access_custom_certificate_expiration_type",
"zone_aop_custom_certificate_expiration_type",
"bgp_hijack_notification",
"http_alert_origin_error",
"workers_alert",
"weekly_account_overview",
"expiring_service_token_alert",
"secondary_dns_all_primaries_failing",
"secondary_dns_zone_validation_warning",
"secondary_dns_primaries_failing",
"secondary_dns_zone_successfully_updated",
"dos_attack_l7",
"dos_attack_l4",
"advanced_ddos_attack_l7_alert",
"advanced_ddos_attack_l4_alert",
"fbm_volumetric_attack",
"fbm_auto_advertisement",
"load_balancing_pool_enablement_alert",
"load_balancing_health_alert",
"g6_health_alert",
"http_alert_edge_error",
"advanced_ddos_attack_l7_alert",
"bgp_hijack_notification",
"billing_usage_alert",
"block_notification_block_removed",
"block_notification_new_block",
"block_notification_review_rejected",
"clickhouse_alert_fw_anomaly",
"clickhouse_alert_fw_ent_anomaly",
"custom_ssl_certificate_event_type",
"dedicated_ssl_certificate_event_type",
"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",
"load_balancing_health_alert",
"load_balancing_pool_enablement_alert",
"real_origin_monitoring",
"scriptmonitor_alert_new_code_change_detections",
"scriptmonitor_alert_new_hosts",
"scriptmonitor_alert_new_scripts",
"scriptmonitor_alert_new_malicious_hosts",
"scriptmonitor_alert_new_malicious_scripts",
"scriptmonitor_alert_new_malicious_url",
"scriptmonitor_alert_new_code_change_detections",
"scriptmonitor_alert_new_max_length_script_url",
"scriptmonitor_alert_new_malicious_hosts",
"scriptmonitor_alert_new_max_length_resource_url",
"scriptmonitor_alert_new_resources",
"secondary_dns_all_primaries_failing",
"secondary_dns_primaries_failing",
"secondary_dns_zone_successfully_updated",
"secondary_dns_zone_validation_warning",
"sentinel_alert",
"hostname_aop_custom_certificate_expiration_type",
"stream_live_notifications",
"block_notification_new_block",
"block_notification_review_rejected",
"block_notification_review_accepted",
"tunnel_health_event",
"tunnel_update_event",
"universal_ssl_event_type",
"web_analytics_metrics_update",
"workers_uptime",
"weekly_account_overview",
"workers_alert",
"zone_aop_custom_certificate_expiration_type",
})),
},
"filters": notificationPolicyFilterSchema(),
Expand Down