From 7843a6058c640ecc29138c56dcd57e0d00391900 Mon Sep 17 00:00:00 2001 From: Diego Bonfigli Date: Fri, 28 Nov 2025 18:00:33 +0100 Subject: [PATCH 1/2] feat(alerts): add notify_on_acknwoledge, deprecated opts at notification channel level --- sysdig/internal/client/v2/model.go | 8 +-- ...resource_sysdig_monitor_alert_v2_common.go | 23 +++++++ ...dig_monitor_notification_channel_common.go | 60 +++++++++++++++---- ...otification_channel_custom_webhook_test.go | 21 +++++++ ...sdig_secure_notification_channel_common.go | 60 +++++++++++++++---- website/docs/r/monitor_alert_v2_change.md | 3 +- website/docs/r/monitor_alert_v2_downtime.md | 5 +- website/docs/r/monitor_alert_v2_event.md | 5 +- .../monitor_alert_v2_form_based_prometheus.md | 3 +- .../docs/r/monitor_alert_v2_group_outlier.md | 5 +- website/docs/r/monitor_alert_v2_metric.md | 5 +- website/docs/r/monitor_alert_v2_prometheus.md | 3 +- ...tor_notification_channel_custom_webhook.md | 8 +-- .../r/monitor_notification_channel_email.md | 8 +-- ...onitor_notification_channel_google_chat.md | 8 +-- ...fication_channel_ibm_event_notification.md | 10 +--- .../r/monitor_notification_channel_msteams.md | 8 +-- .../monitor_notification_channel_opsgenie.md | 8 +-- .../monitor_notification_channel_pagerduty.md | 8 +-- ...cation_channel_prometheus_alert_manager.md | 8 +-- .../r/monitor_notification_channel_slack.md | 8 +-- .../r/monitor_notification_channel_sns.md | 8 +-- ...monitor_notification_channel_team_email.md | 8 +-- .../monitor_notification_channel_victorops.md | 8 +-- .../r/monitor_notification_channel_webhook.md | 8 +-- .../r/secure_notification_channel_email.md | 8 +-- .../r/secure_notification_channel_msteams.md | 18 +++--- .../r/secure_notification_channel_opsgenie.md | 8 +-- .../secure_notification_channel_pagerduty.md | 8 +-- ...cation_channel_prometheus_alert_manager.md | 8 +-- .../r/secure_notification_channel_slack.md | 8 +-- .../docs/r/secure_notification_channel_sns.md | 8 +-- .../secure_notification_channel_team_email.md | 8 +-- .../secure_notification_channel_victorops.md | 8 +-- .../r/secure_notification_channel_webhook.md | 8 +-- 35 files changed, 217 insertions(+), 180 deletions(-) diff --git a/sysdig/internal/client/v2/model.go b/sysdig/internal/client/v2/model.go index 0b6fe7a9f..71b2fc7c0 100644 --- a/sysdig/internal/client/v2/model.go +++ b/sysdig/internal/client/v2/model.go @@ -138,9 +138,9 @@ type NotificationChannelOptions struct { CustomData map[string]any `json:"customData,omitempty"` // Type: ibm function, Webhook TemplateConfiguration []NotificationChannelTemplateConfiguration `json:"templateConfiguration,omitempty"` // Type: slack, ms teams - NotifyOnOk bool `json:"notifyOnOk"` - NotifyOnResolve bool `json:"notifyOnResolve"` - SendTestNotification bool `json:"sendTestNotification"` + NotifyOnOk *bool `json:"notifyOnOk,omitempty"` + NotifyOnResolve *bool `json:"notifyOnResolve,omitempty"` + SendTestNotification bool `json:"sendTestNotification"` } type NotificationChannel struct { @@ -628,7 +628,7 @@ type NotificationChannelConfigV2 struct { } type NotificationChannelOptionsV2 struct { - NotifyOnAcknowledge bool `json:"notifyOnAcknowledge,omitempty"` + NotifyOnAcknowledge *bool `json:"notifyOnAcknowledge,omitempty"` NotifyOnResolve bool `json:"notifyOnResolve"` ReNotifyEverySec *int `json:"reNotifyEverySec"` CustomNotificationTemplate *CustomNotificationTemplateV2 `json:"customNotificationTemplate,omitempty"` diff --git a/sysdig/resource_sysdig_monitor_alert_v2_common.go b/sysdig/resource_sysdig_monitor_alert_v2_common.go index cab9ee41e..c3c3057d8 100644 --- a/sysdig/resource_sysdig_monitor_alert_v2_common.go +++ b/sysdig/resource_sysdig_monitor_alert_v2_common.go @@ -83,6 +83,11 @@ func createAlertV2Schema(original map[string]*schema.Schema) map[string]*schema. Optional: true, Default: true, }, + "notify_on_acknowledge": { + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"true", "false"}, false), + }, "main_threshold": { Type: schema.TypeBool, Optional: true, @@ -262,6 +267,16 @@ func buildAlertV2CommonStruct(d *schema.ResourceData) *v2.AlertV2Common { } newChannel.OverrideOptions.NotifyOnResolve = channelMap["notify_on_resolve"].(bool) + if notifyOnAcknowledge, ok := channelMap["notify_on_acknowledge"]; ok && notifyOnAcknowledge.(string) != "" { + if notifyOnAcknowledge.(string) == "true" { + trueValue := true + newChannel.OverrideOptions.NotifyOnAcknowledge = &trueValue + } else { + falseValue := false + newChannel.OverrideOptions.NotifyOnAcknowledge = &falseValue + } + // else do not set any value for newChannel.OverrideOptions.NotifyOnAcknowledge + } newChannel.OverrideOptions.Thresholds = []string{} mainThreshold := channelMap["main_threshold"].(bool) @@ -358,6 +373,14 @@ func updateAlertV2CommonState(d *schema.ResourceData, alert *v2.AlertV2Common) ( "notify_on_resolve": ncc.OverrideOptions.NotifyOnResolve, } + if ncc.OverrideOptions.NotifyOnAcknowledge != nil { + if *ncc.OverrideOptions.NotifyOnAcknowledge { + config["notify_on_acknowledge"] = "true" + } else { + config["notify_on_acknowledge"] = "false" + } + } + if ncc.OverrideOptions.ReNotifyEverySec != nil { config["renotify_every_minutes"] = secondsToMinutes(*ncc.OverrideOptions.ReNotifyEverySec) } else { diff --git a/sysdig/resource_sysdig_monitor_notification_channel_common.go b/sysdig/resource_sysdig_monitor_notification_channel_common.go index b98c25a63..e06d13541 100644 --- a/sysdig/resource_sysdig_monitor_notification_channel_common.go +++ b/sysdig/resource_sysdig_monitor_notification_channel_common.go @@ -3,6 +3,7 @@ package sysdig import ( v2 "github.com/draios/terraform-provider-sysdig/sysdig/internal/client/v2" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) func createMonitorNotificationChannelSchema(original map[string]*schema.Schema) map[string]*schema.Schema { @@ -22,14 +23,16 @@ func createMonitorNotificationChannelSchema(original map[string]*schema.Schema) Default: false, }, "notify_when_ok": { - Type: schema.TypeBool, - Optional: true, - Default: false, + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"true", "false"}, false), + Deprecated: "The notify_when_ok field is deprecated and will be removed in a future version. This flag has been replaced by the `notify_on_resolve` field inside `notification_channels` when defining an alert resource.", }, "notify_when_resolved": { - Type: schema.TypeBool, - Optional: true, - Default: false, + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"true", "false"}, false), + Deprecated: "The notify_when_resolved field is deprecated and will be removed in a future version. This flag has been replaced by the `notify_on_acknowledge` field inside `notification_channels` when defining an alert resource.", }, "version": { Type: schema.TypeInt, @@ -56,13 +59,35 @@ func monitorNotificationChannelFromResourceData(d *schema.ResourceData, teamID i tID = &teamID } + var notifyOnOk *bool = nil + if onOk, ok := d.GetOk("notify_when_ok"); ok && onOk.(string) != "" { + if onOk.(string) == "true" { + trueValue := true + notifyOnOk = &trueValue + } else { + falseValue := false + notifyOnOk = &falseValue + } + } + + var notifyOnResolve *bool = nil + if onResolve, ok := d.GetOk("notify_when_resolved"); ok && onResolve.(string) != "" { + if onResolve.(string) == "true" { + trueValue := true + notifyOnResolve = &trueValue + } else { + falseValue := false + notifyOnResolve = &falseValue + } + } + nc = v2.NotificationChannel{ Name: d.Get("name").(string), Enabled: d.Get("enabled").(bool), TeamID: tID, Options: v2.NotificationChannelOptions{ - NotifyOnOk: d.Get("notify_when_ok").(bool), - NotifyOnResolve: d.Get("notify_when_resolved").(bool), + NotifyOnOk: notifyOnOk, + NotifyOnResolve: notifyOnResolve, SendTestNotification: d.Get("send_test_notification").(bool), }, } @@ -82,8 +107,23 @@ func monitorNotificationChannelToResourceData(nc *v2.NotificationChannel, data * if err != nil { return err } - _ = data.Set("notify_when_ok", nc.Options.NotifyOnOk) - _ = data.Set("notify_when_resolved", nc.Options.NotifyOnResolve) + + if nc.Options.NotifyOnOk != nil { + if *nc.Options.NotifyOnOk { + _ = data.Set("notify_when_ok", "true") + } else { + _ = data.Set("notify_when_ok", "false") + } + } + + if nc.Options.NotifyOnResolve != nil { + if *nc.Options.NotifyOnResolve { + _ = data.Set("notify_when_resolved", "true") + } else { + _ = data.Set("notify_when_resolved", "false") + } + } + // do not update "send_test_notification" from the api response as it will always be "false" on subsequent reads because the fields is not persisted return err diff --git a/sysdig/resource_sysdig_monitor_notification_channel_custom_webhook_test.go b/sysdig/resource_sysdig_monitor_notification_channel_custom_webhook_test.go index bd7eb8d97..68f0da672 100644 --- a/sysdig/resource_sysdig_monitor_notification_channel_custom_webhook_test.go +++ b/sysdig/resource_sysdig_monitor_notification_channel_custom_webhook_test.go @@ -69,6 +69,15 @@ func TestAccMonitorNotificationChannelCustomWebhook(t *testing.T) { ImportStateVerify: true, ImportStateVerifyIgnore: []string{"send_test_notification"}, }, + { + Config: monitorNotificationChannelCustomWebhookWithoutNotifyFields(rText()), + }, + { + ResourceName: "sysdig_monitor_notification_channel_custom_webhook.sample-custom-webhook6", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"send_test_notification"}, + }, }, }) } @@ -150,3 +159,15 @@ func monitorNotificationChannelCustomWebhookSharedWithAdditionalHeaders(name str send_test_notification = false }`, name) } + +func monitorNotificationChannelCustomWebhookWithoutNotifyFields(name string) string { + return fmt.Sprintf(` +resource "sysdig_monitor_notification_channel_custom_webhook" "sample-custom-webhook6" { + name = "Example Channel %s - Custom Webhook" + enabled = true + url = "https://example.com/" + http_method = "POST" + template = "{\n \"code\": \"incident\",\n \"alert\": \"{{@alert_name}}\"\n}" + send_test_notification = false +}`, name) +} diff --git a/sysdig/resource_sysdig_secure_notification_channel_common.go b/sysdig/resource_sysdig_secure_notification_channel_common.go index ec0d63f7e..b1b592af8 100644 --- a/sysdig/resource_sysdig_secure_notification_channel_common.go +++ b/sysdig/resource_sysdig_secure_notification_channel_common.go @@ -3,6 +3,7 @@ package sysdig import ( v2 "github.com/draios/terraform-provider-sysdig/sysdig/internal/client/v2" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) func createSecureNotificationChannelSchema(original map[string]*schema.Schema) map[string]*schema.Schema { @@ -22,14 +23,16 @@ func createSecureNotificationChannelSchema(original map[string]*schema.Schema) m Default: false, }, "notify_when_ok": { - Type: schema.TypeBool, - Optional: true, - Default: false, + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"true", "false"}, false), + Deprecated: "The notify_when_ok field is deprecated and will be removed in a future version. This flag has been replaced by the `notify_on_resolve` field inside `notification_channels` when defining an alert resource.", }, "notify_when_resolved": { - Type: schema.TypeBool, - Optional: true, - Default: false, + Type: schema.TypeString, + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"true", "false"}, false), + Deprecated: "The notify_when_resolved field is deprecated and will be removed in a future version. This flag has been replaced by the `notify_on_acknowledge` field inside `notification_channels` when defining an alert resource.", }, "version": { Type: schema.TypeInt, @@ -56,13 +59,35 @@ func secureNotificationChannelFromResourceData(d *schema.ResourceData, teamID in tID = &teamID } + var notifyOnOk *bool = nil + if onOk, ok := d.GetOk("notify_when_ok"); ok && onOk.(string) != "" { + if onOk.(string) == "true" { + trueValue := true + notifyOnOk = &trueValue + } else { + falseValue := false + notifyOnOk = &falseValue + } + } + + var notifyOnResolve *bool = nil + if onResolve, ok := d.GetOk("notify_when_resolved"); ok && onResolve.(string) != "" { + if onResolve.(string) == "true" { + trueValue := true + notifyOnResolve = &trueValue + } else { + falseValue := false + notifyOnResolve = &falseValue + } + } + nc = v2.NotificationChannel{ Name: d.Get("name").(string), Enabled: d.Get("enabled").(bool), TeamID: tID, Options: v2.NotificationChannelOptions{ - NotifyOnOk: d.Get("notify_when_ok").(bool), - NotifyOnResolve: d.Get("notify_when_resolved").(bool), + NotifyOnOk: notifyOnOk, + NotifyOnResolve: notifyOnResolve, SendTestNotification: d.Get("send_test_notification").(bool), }, } @@ -82,8 +107,23 @@ func secureNotificationChannelToResourceData(nc *v2.NotificationChannel, data *s if err != nil { return err } - _ = data.Set("notify_when_ok", nc.Options.NotifyOnOk) - _ = data.Set("notify_when_resolved", nc.Options.NotifyOnResolve) + + if nc.Options.NotifyOnOk != nil { + if *nc.Options.NotifyOnOk { + _ = data.Set("notify_when_ok", "true") + } else { + _ = data.Set("notify_when_ok", "false") + } + } + + if nc.Options.NotifyOnResolve != nil { + if *nc.Options.NotifyOnResolve { + _ = data.Set("notify_when_resolved", "true") + } else { + _ = data.Set("notify_when_resolved", "false") + } + } + // do not update "send_test_notification" from the api response as it will always be "false" on subsequent reads because the fields is not persisted return err diff --git a/website/docs/r/monitor_alert_v2_change.md b/website/docs/r/monitor_alert_v2_change.md index 0affb3503..25d7982fa 100644 --- a/website/docs/r/monitor_alert_v2_change.md +++ b/website/docs/r/monitor_alert_v2_change.md @@ -75,7 +75,8 @@ By defining this field, the user can choose to which notification channels send It is a list of objects with the following fields: * `id` - (Required) The ID of the notification channel. * `renotify_every_minutes` - (Optional) the amount of minutes to wait before re sending the notification to this channel. `0` means no renotification enabled. Default: `0`. -* `notify_on_resolve` - (Optional) Wether to send a notification when the alert is resolved. Default: `true`. +* `notify_on_resolve` - (Optional) Whether to send a notification when the alert is resolved. Default: `true`. +* `notify_on_acknowledge` - (Optional) Whether to send a notification when the alert is acknowledged. If not defined, this option is inherited from the `notify_when_resolved` option from the specific notification channel selected. If it is not defined there, the default is to send notification on acknowledgement. * `main_threshold` - (Optional) Whether this notification channel is used for the main threshold of the alert. Default: `true`. * `warning_threshold` - (Optional) Whether this notification channel is used for the warning threshold of the alert. Default: `false`. diff --git a/website/docs/r/monitor_alert_v2_downtime.md b/website/docs/r/monitor_alert_v2_downtime.md index b5e3ad0fd..93306dfb6 100644 --- a/website/docs/r/monitor_alert_v2_downtime.md +++ b/website/docs/r/monitor_alert_v2_downtime.md @@ -63,7 +63,8 @@ By defining this field, the user can choose to which notification channels send It is a list of objects with the following fields: * `id` - (Required) The ID of the notification channel. * `renotify_every_minutes` - (Optional) the amount of minutes to wait before re sending the notification to this channel. `0` means no renotification enabled. Default: `0`. -* `notify_on_resolve` - (Optional) Wether to send a notification when the alert is resolved. Default: `true`. +* `notify_on_resolve` - (Optional) Whether to send a notification when the alert is resolved. Default: `true`. +* `notify_on_acknowledge` - (Optional) Whether to send a notification when the alert is acknowledged. If not defined, this option is inherited from the `notify_when_resolved` option from the specific notification channel selected. If it is not defined there, the default is to send notification on acknowledgement. ### `custom_notification` @@ -94,7 +95,7 @@ Enables the creation of a capture file of the syscalls during the event. * `duration_seconds` - (Optional) Time frame of the capture. Default: `15`. * `storage` - (Optional) Custom bucket where to save the capture. * `filter` - (Optional) Additional filter to apply to the capture. For example: `proc.name contains nginx`. -* `enabled` - (Optional) Wether to enable captures. Default: `true`. +* `enabled` - (Optional) Whether to enable captures. Default: `true`. ### Downtime alert arguments diff --git a/website/docs/r/monitor_alert_v2_event.md b/website/docs/r/monitor_alert_v2_event.md index 4d801315a..dee774d9f 100644 --- a/website/docs/r/monitor_alert_v2_event.md +++ b/website/docs/r/monitor_alert_v2_event.md @@ -73,7 +73,8 @@ By defining this field, the user can choose to which notification channels send It is a list of objects with the following fields: * `id` - (Required) The ID of the notification channel. * `renotify_every_minutes` - (Optional) the amount of minutes to wait before re sending the notification to this channel. `0` means no renotification enabled. Default: `0`. -* `notify_on_resolve` - (Optional) Wether to send a notification when the alert is resolved. Default: `true`. +* `notify_on_resolve` - (Optional) Whether to send a notification when the alert is resolved. Default: `true`. +* `notify_on_acknowledge` - (Optional) Whether to send a notification when the alert is acknowledged. If not defined, this option is inherited from the `notify_when_resolved` option from the specific notification channel selected. If it is not defined there, the default is to send notification on acknowledgement. * `main_threshold` - (Optional) Whether this notification channel is used for the main threshold of the alert. Default: `true`. * `warning_threshold` - (Optional) Whether this notification channel is used for the warning threshold of the alert. Default: `false`. @@ -106,7 +107,7 @@ Enables the creation of a capture file of the syscalls during the event. * `duration_seconds` - (Optional) Time frame of the capture. Default: `15`. * `storage` - (Optional) Custom bucket where to save the capture. * `filter` - (Optional) Additional filter to apply to the capture. For example: `proc.name contains nginx`. -* `enabled` - (Optional) Wether to enable captures. Default: `true`. +* `enabled` - (Optional) Whether to enable captures. Default: `true`. ### Event alert arguments diff --git a/website/docs/r/monitor_alert_v2_form_based_prometheus.md b/website/docs/r/monitor_alert_v2_form_based_prometheus.md index aa885ca5b..2e1fca125 100644 --- a/website/docs/r/monitor_alert_v2_form_based_prometheus.md +++ b/website/docs/r/monitor_alert_v2_form_based_prometheus.md @@ -54,7 +54,8 @@ By defining this field, the user can choose to which notification channels send It is a list of objects with the following fields: * `id` - (Required) The ID of the notification channel. * `renotify_every_minutes` - (Optional) the amount of minutes to wait before re sending the notification to this channel. `0` means no renotification enabled. -* `notify_on_resolve` - (Optional) Wether to send a notification when the alert is resolved. Default: `true`. +* `notify_on_resolve` - (Optional) Whether to send a notification when the alert is resolved. Default: `true`. +* `notify_on_acknowledge` - (Optional) Whether to send a notification when the alert is acknowledged. If not defined, this option is inherited from the `notify_when_resolved` option from the specific notification channel selected. If it is not defined there, the default is to send notification on acknowledgement. * `main_threshold` - (Optional) Whether this notification channel is used for the main threshold of the alert. Default: `true`. * `warning_threshold` - (Optional) Whether this notification channel is used for the warning threshold of the alert. Default: `false`. diff --git a/website/docs/r/monitor_alert_v2_group_outlier.md b/website/docs/r/monitor_alert_v2_group_outlier.md index d4bc9caa8..714bbe929 100644 --- a/website/docs/r/monitor_alert_v2_group_outlier.md +++ b/website/docs/r/monitor_alert_v2_group_outlier.md @@ -75,7 +75,8 @@ By defining this field, the user can choose to which notification channels send It is a list of objects with the following fields: * `id` - (Required) The ID of the notification channel. * `renotify_every_minutes` - (Optional) the amount of minutes to wait before re sending the notification to this channel. `0` means no renotification enabled. Default: `0`. -* `notify_on_resolve` - (Optional) Wether to send a notification when the alert is resolved. Default: `true`. +* `notify_on_resolve` - (Optional) Whether to send a notification when the alert is resolved. Default: `true`. +* `notify_on_acknowledge` - (Optional) Whether to send a notification when the alert is acknowledged. If not defined, this option is inherited from the `notify_when_resolved` option from the specific notification channel selected. If it is not defined there, the default is to send notification on acknowledgement. * `main_threshold` - (Optional) Whether this notification channel is used for the main threshold of the alert. Default: `true`. * `warning_threshold` - (Optional) Whether this notification channel is used for the warning threshold of the alert. Default: `false`. @@ -108,7 +109,7 @@ Enables the creation of a capture file of the syscalls during the event. * `duration_seconds` - (Optional) Time frame of the capture. Default: `15`. * `storage` - (Optional) Custom bucket where to save the capture. * `filter` - (Optional) Additional filter to apply to the capture. For example: `proc.name contains nginx`. -* `enabled` - (Optional) Wether to enable captures. Default: `true`. +* `enabled` - (Optional) Whether to enable captures. Default: `true`. ### Group Outlier alert arguments diff --git a/website/docs/r/monitor_alert_v2_metric.md b/website/docs/r/monitor_alert_v2_metric.md index 01484092a..9c122bf3c 100644 --- a/website/docs/r/monitor_alert_v2_metric.md +++ b/website/docs/r/monitor_alert_v2_metric.md @@ -90,7 +90,8 @@ By defining this field, the user can choose to which notification channels send It is a list of objects with the following fields: * `id` - (Required) The ID of the notification channel. * `renotify_every_minutes` - (Optional) the amount of minutes to wait before re sending the notification to this channel. `0` means no renotification enabled. Default: `0`. -* `notify_on_resolve` - (Optional) Wether to send a notification when the alert is resolved. Default: `true`. +* `notify_on_resolve` - (Optional) Whether to send a notification when the alert is resolved. Default: `true`. +* `notify_on_acknowledge` - (Optional) Whether to send a notification when the alert is acknowledged. If not defined, this option is inherited from the `notify_when_resolved` option from the specific notification channel selected. If it is not defined there, the default is to send notification on acknowledgement. * `main_threshold` - (Optional) Whether this notification channel is used for the main threshold of the alert. Default: `true`. * `warning_threshold` - (Optional) Whether this notification channel is used for the warning threshold of the alert. Default: `false`. @@ -123,7 +124,7 @@ Enables the creation of a capture file of the syscalls during the event. * `duration_seconds` - (Optional) Time frame of the capture. Default: `15`. * `storage` - (Optional) Custom bucket where to save the capture. * `filter` - (Optional) Additional filter to apply to the capture. For example: `proc.name contains nginx`. -* `enabled` - (Optional) Wether to enable captures. Default: `true`. +* `enabled` - (Optional) Whether to enable captures. Default: `true`. ### Metric Threshold alert arguments diff --git a/website/docs/r/monitor_alert_v2_prometheus.md b/website/docs/r/monitor_alert_v2_prometheus.md index 4eab3b8b1..ca87d4283 100644 --- a/website/docs/r/monitor_alert_v2_prometheus.md +++ b/website/docs/r/monitor_alert_v2_prometheus.md @@ -56,7 +56,8 @@ By defining this field, the user can choose to which notification channels send It is a list of objects with the following fields: * `id` - (Required) The ID of the notification channel. * `renotify_every_minutes` - (Optional) the amount of minutes to wait before re sending the notification to this channel. `0` means no renotification enabled. -* `notify_on_resolve` - (Optional) Wether to send a notification when the alert is resolved. Default: `true`. +* `notify_on_resolve` - (Optional) Whether to send a notification when the alert is resolved. Default: `true`. +* `notify_on_acknowledge` - (Optional) Whether to send a notification when the alert is acknowledged. If not defined, this option is inherited from the `notify_when_resolved` option from the specific notification channel selected. If it is not defined there, the default is to send notification on acknowledgement. ### `custom_notification` diff --git a/website/docs/r/monitor_notification_channel_custom_webhook.md b/website/docs/r/monitor_notification_channel_custom_webhook.md index cfaaa3e6d..bb2f777d4 100644 --- a/website/docs/r/monitor_notification_channel_custom_webhook.md +++ b/website/docs/r/monitor_notification_channel_custom_webhook.md @@ -26,8 +26,6 @@ resource "sysdig_monitor_notification_channel_custom_webhook" "sample-custom-web "custom-Header": "TestHeader" } - notify_when_ok = false - notify_when_resolved = false send_test_notification = false } ``` @@ -48,11 +46,9 @@ resource "sysdig_monitor_notification_channel_custom_webhook" "sample-custom-web * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional) Send a new notification when the alert condition is - no longer triggered. Default is false. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. -* `notify_when_resolved` - (Optional) Send a new notification when the alert is manually - acknowledged by a user. Default is false. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/monitor_notification_channel_email.md b/website/docs/r/monitor_notification_channel_email.md index 9f71c4609..174a5fe5b 100644 --- a/website/docs/r/monitor_notification_channel_email.md +++ b/website/docs/r/monitor_notification_channel_email.md @@ -19,8 +19,6 @@ resource "sysdig_monitor_notification_channel_email" "sample_email" { name = "Example Channel - Email" recipients = ["foo@localhost.com", "bar@localhost.com"] enabled = true - notify_when_ok = false - notify_when_resolved = false send_test_notification = false } ``` @@ -34,11 +32,9 @@ resource "sysdig_monitor_notification_channel_email" "sample_email" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional) Send a new notification when the alert condition is - no longer triggered. Default is false. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. -* `notify_when_resolved` - (Optional) Send a new notification when the alert is manually - acknowledged by a user. Default is false. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/monitor_notification_channel_google_chat.md b/website/docs/r/monitor_notification_channel_google_chat.md index 30756193a..ec21e5fcd 100644 --- a/website/docs/r/monitor_notification_channel_google_chat.md +++ b/website/docs/r/monitor_notification_channel_google_chat.md @@ -19,8 +19,6 @@ resource "sysdig_monitor_notification_channel_google_chat" "sample-gchat" { name = "Example Channel - google chat" enabled = true url = "https://chat.googleapis.com/v1/spaces/XXXXXX/messages?key=XXXXXXXXXXXXXXXXX" - notify_when_ok = false - notify_when_resolved = false share_with_current_team = true } ``` @@ -33,11 +31,9 @@ resource "sysdig_monitor_notification_channel_google_chat" "sample-gchat" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional) Send a new notification when the alert condition is - no longer triggered. Default is false. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. -* `notify_when_resolved` - (Optional) Send a new notification when the alert is manually - acknowledged by a user. Default is false. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/monitor_notification_channel_ibm_event_notification.md b/website/docs/r/monitor_notification_channel_ibm_event_notification.md index 8c6c528d8..37d53641c 100644 --- a/website/docs/r/monitor_notification_channel_ibm_event_notification.md +++ b/website/docs/r/monitor_notification_channel_ibm_event_notification.md @@ -20,8 +20,6 @@ resource "sysdig_monitor_notification_channel_ibm_event_notification" "sample" { name = "Example Channel - IBM Event Notification" enabled = true instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" - notify_when_ok = false - notify_when_resolved = false share_with_current_team = true } ``` @@ -32,8 +30,6 @@ resource "sysdig_monitor_notification_channel_ibm_event_notification" "sample" { name = "Example Channel - IBM Event Notification" enabled = true instance_id = "crn:v1:bluemix:public:event-notifications:global:a/59bcbfa6ea2f006b4ed7094c1a08dcdd:1a0ec336-f391-4091-a6fb-5e084a4c56f4::" - notify_when_ok = false - notify_when_resolved = false share_with_current_team = true } ``` @@ -46,11 +42,9 @@ resource "sysdig_monitor_notification_channel_ibm_event_notification" "sample" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional) Send a new notification when the alert condition is - no longer triggered. Default is false. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. -* `notify_when_resolved` - (Optional) Send a new notification when the alert is manually - acknowledged by a user. Default is false. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/monitor_notification_channel_msteams.md b/website/docs/r/monitor_notification_channel_msteams.md index 13fd3308b..37d455e4c 100644 --- a/website/docs/r/monitor_notification_channel_msteams.md +++ b/website/docs/r/monitor_notification_channel_msteams.md @@ -19,8 +19,6 @@ resource "sysdig_monitor_notification_channel_msteams" "sample-msteams" { name = "Example Channel - MS Teams" enabled = true url = "https://xxxxx.webhook.office.com/xxxxxxxxx" - notify_when_ok = false - notify_when_resolved = false share_with_current_team = true } ``` @@ -33,11 +31,9 @@ resource "sysdig_monitor_notification_channel_msteams" "sample-msteams" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional) Send a new notification when the alert condition is - no longer triggered. Default is false. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. -* `notify_when_resolved` - (Optional) Send a new notification when the alert is manually - acknowledged by a user. Default is false. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/monitor_notification_channel_opsgenie.md b/website/docs/r/monitor_notification_channel_opsgenie.md index 29968dd7a..b845410db 100644 --- a/website/docs/r/monitor_notification_channel_opsgenie.md +++ b/website/docs/r/monitor_notification_channel_opsgenie.md @@ -19,8 +19,6 @@ resource "sysdig_monitor_notification_channel_opsgenie" "sample-opsgenie" { name = "Example Channel - OpsGenie" enabled = true api_key = "2349324-342354353-5324-23" - notify_when_ok = false - notify_when_resolved = false } ``` @@ -34,11 +32,9 @@ resource "sysdig_monitor_notification_channel_opsgenie" "sample-opsgenie" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional) Send a new notification when the alert condition is - no longer triggered. Default is false. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. -* `notify_when_resolved` - (Optional) Send a new notification when the alert is manually - acknowledged by a user. Default is false. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/monitor_notification_channel_pagerduty.md b/website/docs/r/monitor_notification_channel_pagerduty.md index 93bf8094d..cf3667b07 100644 --- a/website/docs/r/monitor_notification_channel_pagerduty.md +++ b/website/docs/r/monitor_notification_channel_pagerduty.md @@ -21,8 +21,6 @@ resource "sysdig_monitor_notification_channel_pagerduty" "sample-pagerduty" { account = "account" service_key = "XXXXXXXXXX" service_name = "sysdig" - notify_when_ok = false - notify_when_resolved = false send_test_notification = false } ``` @@ -39,11 +37,9 @@ resource "sysdig_monitor_notification_channel_pagerduty" "sample-pagerduty" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional) Send a new notification when the alert condition is - no longer triggered. Default is false. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. -* `notify_when_resolved` - (Optional) Send a new notification when the alert is manually - acknowledged by a user. Default is false. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/monitor_notification_channel_prometheus_alert_manager.md b/website/docs/r/monitor_notification_channel_prometheus_alert_manager.md index 5208ff6bc..d55f354b1 100644 --- a/website/docs/r/monitor_notification_channel_prometheus_alert_manager.md +++ b/website/docs/r/monitor_notification_channel_prometheus_alert_manager.md @@ -19,8 +19,6 @@ resource "sysdig_monitor_notification_channel_prometheus_alert_manager" "sample" name = "Example Channel - Prometheus Alert Manager" enabled = true url = "https://testurl:8080" - notify_when_ok = false - notify_when_resolved = false send_test_notification = false additional_headers = { @@ -41,11 +39,9 @@ resource "sysdig_monitor_notification_channel_prometheus_alert_manager" "sample" * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional) Send a new notification when the alert condition is - no longer triggered. Default is false. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. -* `notify_when_resolved` - (Optional) Send a new notification when the alert is manually - acknowledged by a user. Default is false. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/monitor_notification_channel_slack.md b/website/docs/r/monitor_notification_channel_slack.md index 0c569eb9f..12dd2560e 100644 --- a/website/docs/r/monitor_notification_channel_slack.md +++ b/website/docs/r/monitor_notification_channel_slack.md @@ -21,8 +21,6 @@ resource "sysdig_monitor_notification_channel_slack" "sample-slack" { url = "https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX" channel = "#sysdig" is_private_channel = false - notify_when_ok = false - notify_when_resolved = false } ``` @@ -54,11 +52,9 @@ resource "sysdig_monitor_notification_channel_slack" "sample-slack" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional) Send a new notification when the alert condition is - no longer triggered. Default is false. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. -* `notify_when_resolved` - (Optional) Send a new notification when the alert is manually - acknowledged by a user. Default is false. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/monitor_notification_channel_sns.md b/website/docs/r/monitor_notification_channel_sns.md index 4bc69da68..6e5490c28 100644 --- a/website/docs/r/monitor_notification_channel_sns.md +++ b/website/docs/r/monitor_notification_channel_sns.md @@ -19,8 +19,6 @@ resource "sysdig_monitor_notification_channel_sns" "sample-amazon-sns" { name = "Example Channel - Amazon SNS" enabled = true topics = ["arn:aws:sns:us-east-1:273489009834:my-alerts2", "arn:aws:sns:us-east-1:279948934544:my-alerts"] - notify_when_ok = false - notify_when_resolved = false send_test_notification = false } ``` @@ -33,11 +31,9 @@ resource "sysdig_monitor_notification_channel_sns" "sample-amazon-sns" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional) Send a new notification when the alert condition is - no longer triggered. Default is false. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. -* `notify_when_resolved` - (Optional) Send a new notification when the alert is manually - acknowledged by a user. Default is false. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/monitor_notification_channel_team_email.md b/website/docs/r/monitor_notification_channel_team_email.md index 3c9975333..c8e47834d 100644 --- a/website/docs/r/monitor_notification_channel_team_email.md +++ b/website/docs/r/monitor_notification_channel_team_email.md @@ -20,8 +20,6 @@ resource "sysdig_monitor_notification_channel_team_email" "sample-team-email" { team_id = 1 include_admin_users = false enabled = true - notify_when_ok = false - notify_when_resolved = false share_with_current_team = true } ``` @@ -36,11 +34,9 @@ resource "sysdig_monitor_notification_channel_team_email" "sample-team-email" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional) Send a new notification when the alert condition is - no longer triggered. Default is false. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. -* `notify_when_resolved` - (Optional) Send a new notification when the alert is manually - acknowledged by a user. Default is false. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/monitor_notification_channel_victorops.md b/website/docs/r/monitor_notification_channel_victorops.md index 418dcafcc..3bb67039c 100644 --- a/website/docs/r/monitor_notification_channel_victorops.md +++ b/website/docs/r/monitor_notification_channel_victorops.md @@ -20,8 +20,6 @@ resource "sysdig_monitor_notification_channel_victorops" "sample-victorops" { enabled = true api_key = "1234342-4234243-4234-2" routing_key = "My team" - notify_when_ok = false - notify_when_resolved = false send_test_notification = false } ``` @@ -36,11 +34,9 @@ resource "sysdig_monitor_notification_channel_victorops" "sample-victorops" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional) Send a new notification when the alert condition is - no longer triggered. Default is false. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. -* `notify_when_resolved` - (Optional) Send a new notification when the alert is manually - acknowledged by a user. Default is false. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/monitor_notification_channel_webhook.md b/website/docs/r/monitor_notification_channel_webhook.md index f9d356ed0..2f11996db 100644 --- a/website/docs/r/monitor_notification_channel_webhook.md +++ b/website/docs/r/monitor_notification_channel_webhook.md @@ -19,8 +19,6 @@ resource "sysdig_monitor_notification_channel_webhook" "sample-webhook" { name = "Example Channel - Webhook" enabled = true url = "localhost:8080" - notify_when_ok = false - notify_when_resolved = false send_test_notification = false custom_data = { @@ -44,11 +42,9 @@ resource "sysdig_monitor_notification_channel_webhook" "sample-webhook" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional) Send a new notification when the alert condition is - no longer triggered. Default is false. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. -* `notify_when_resolved` - (Optional) Send a new notification when the alert is manually - acknowledged by a user. Default is false. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/secure_notification_channel_email.md b/website/docs/r/secure_notification_channel_email.md index 1c76e8385..41d417510 100644 --- a/website/docs/r/secure_notification_channel_email.md +++ b/website/docs/r/secure_notification_channel_email.md @@ -19,8 +19,6 @@ resource "sysdig_secure_notification_channel_email" "sample_email" { name = "Example Channel - Email" recipients = ["foo@localhost.com", "bar@localhost.com"] enabled = true - notify_when_ok = false - notify_when_resolved = false send_test_notification = false } ``` @@ -34,11 +32,9 @@ resource "sysdig_secure_notification_channel_email" "sample_email" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional) Send a new notification when the alert condition is - no longer triggered. Default is false. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. -* `notify_when_resolved` - (Optional) Send a new notification when the alert is manually - acknowledged by a user. Default is false. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/secure_notification_channel_msteams.md b/website/docs/r/secure_notification_channel_msteams.md index d2667bb9c..e89d665a3 100644 --- a/website/docs/r/secure_notification_channel_msteams.md +++ b/website/docs/r/secure_notification_channel_msteams.md @@ -16,12 +16,10 @@ Creates a Sysdig Secure Notification Channel of type MS Teams. ```terraform resource "sysdig_secure_notification_channel_msteams" "sample-msteams" { - name = "Example Channel - MS Teams" - enabled = true - url = "https://xxxxx.webhook.office.com/xxxxxxxxx" - notify_when_ok = false - notify_when_resolved = false - template_version = "v2" + name = "Example Channel - MS Teams" + enabled = true + url = "https://xxxxx.webhook.office.com/xxxxxxxxx" + template_version = "v2" } ``` @@ -33,11 +31,9 @@ resource "sysdig_secure_notification_channel_msteams" "sample-msteams" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional) Send a new notification when the alert condition is - no longer triggered. Default is false. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. -* `notify_when_resolved` - (Optional) Send a new notification when the alert is manually - acknowledged by a user. Default is false. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. @@ -63,4 +59,4 @@ MS Teams notification channels for Secure can be imported using the ID, e.g. ``` $ terraform import sysdig_secure_notification_channel_msteams.example 12345 -``` \ No newline at end of file +``` diff --git a/website/docs/r/secure_notification_channel_opsgenie.md b/website/docs/r/secure_notification_channel_opsgenie.md index a3347f797..bdfbdce5d 100644 --- a/website/docs/r/secure_notification_channel_opsgenie.md +++ b/website/docs/r/secure_notification_channel_opsgenie.md @@ -19,8 +19,6 @@ resource "sysdig_secure_notification_channel_opsgenie" "sample-opsgenie" { name = "Example Channel - OpsGenie" enabled = true api_key = "2349324-342354353-5324-23" - notify_when_ok = false - notify_when_resolved = false } ``` @@ -34,11 +32,9 @@ resource "sysdig_secure_notification_channel_opsgenie" "sample-opsgenie" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional) Send a new notification when the alert condition is - no longer triggered. Default is false. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. -* `notify_when_resolved` - (Optional) Send a new notification when the alert is manually - acknowledged by a user. Default is false. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/secure_notification_channel_pagerduty.md b/website/docs/r/secure_notification_channel_pagerduty.md index e90d299ea..518b054ed 100644 --- a/website/docs/r/secure_notification_channel_pagerduty.md +++ b/website/docs/r/secure_notification_channel_pagerduty.md @@ -21,8 +21,6 @@ resource "sysdig_secure_notification_channel_pagerduty" "sample-pagerduty" { account = "account" service_key = "XXXXXXXXXX" service_name = "sysdig" - notify_when_ok = false - notify_when_resolved = false send_test_notification = false } ``` @@ -39,11 +37,9 @@ resource "sysdig_secure_notification_channel_pagerduty" "sample-pagerduty" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional) Send a new notification when the alert condition is - no longer triggered. Default is false. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. -* `notify_when_resolved` - (Optional) Send a new notification when the alert is manually - acknowledged by a user. Default is false. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/secure_notification_channel_prometheus_alert_manager.md b/website/docs/r/secure_notification_channel_prometheus_alert_manager.md index c0af7d46c..b04b19b20 100644 --- a/website/docs/r/secure_notification_channel_prometheus_alert_manager.md +++ b/website/docs/r/secure_notification_channel_prometheus_alert_manager.md @@ -19,8 +19,6 @@ resource "sysdig_secure_notification_channel_prometheus_alert_manager" "sample" name = "Example Channel - Prometheus Alert Manager" enabled = true url = "https://testurl:8080" - notify_when_ok = false - notify_when_resolved = false send_test_notification = false additional_headers = { @@ -41,11 +39,9 @@ resource "sysdig_secure_notification_channel_prometheus_alert_manager" "sample" * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional) Send a new notification when the alert condition is - no longer triggered. Default is false. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. -* `notify_when_resolved` - (Optional) Send a new notification when the alert is manually - acknowledged by a user. Default is false. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/secure_notification_channel_slack.md b/website/docs/r/secure_notification_channel_slack.md index ee726ee5d..4a331152a 100644 --- a/website/docs/r/secure_notification_channel_slack.md +++ b/website/docs/r/secure_notification_channel_slack.md @@ -21,8 +21,6 @@ resource "sysdig_secure_notification_channel_slack" "sample-slack" { url = "https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX" channel = "#sysdig" is_private_channel = false - notify_when_ok = false - notify_when_resolved = false template_version = "v2" } ``` @@ -41,11 +39,9 @@ resource "sysdig_secure_notification_channel_slack" "sample-slack" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional) Send a new notification when the alert condition is - no longer triggered. Default is false. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. -* `notify_when_resolved` - (Optional) Send a new notification when the alert is manually - acknowledged by a user. Default is false. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/secure_notification_channel_sns.md b/website/docs/r/secure_notification_channel_sns.md index d23f0bb55..3c026b608 100644 --- a/website/docs/r/secure_notification_channel_sns.md +++ b/website/docs/r/secure_notification_channel_sns.md @@ -19,8 +19,6 @@ resource "sysdig_secure_notification_channel_sns" "sample-amazon-sns" { name = "Example Channel - Amazon SNS" enabled = true topics = ["arn:aws:sns:us-east-1:273489009834:my-alerts2", "arn:aws:sns:us-east-1:279948934544:my-alerts"] - notify_when_ok = false - notify_when_resolved = false send_test_notification = false } ``` @@ -33,11 +31,9 @@ resource "sysdig_secure_notification_channel_sns" "sample-amazon-sns" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional) Send a new notification when the alert condition is - no longer triggered. Default is false. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. -* `notify_when_resolved` - (Optional) Send a new notification when the alert is manually - acknowledged by a user. Default is false. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/secure_notification_channel_team_email.md b/website/docs/r/secure_notification_channel_team_email.md index fc21eae4e..576a67c71 100644 --- a/website/docs/r/secure_notification_channel_team_email.md +++ b/website/docs/r/secure_notification_channel_team_email.md @@ -20,8 +20,6 @@ resource "sysdig_secure_notification_channel_team_email" "sample-team-email" { team_id = 1 include_admin_users = false enabled = true - notify_when_ok = false - notify_when_resolved = false share_with_current_team = true } ``` @@ -36,11 +34,9 @@ resource "sysdig_secure_notification_channel_team_email" "sample-team-email" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional) Send a new notification when the alert condition is - no longer triggered. Default is false. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. -* `notify_when_resolved` - (Optional) Send a new notification when the alert is manually - acknowledged by a user. Default is false. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/secure_notification_channel_victorops.md b/website/docs/r/secure_notification_channel_victorops.md index 3c80c1942..a1358360b 100644 --- a/website/docs/r/secure_notification_channel_victorops.md +++ b/website/docs/r/secure_notification_channel_victorops.md @@ -20,8 +20,6 @@ resource "sysdig_secure_notification_channel_victorops" "sample-victorops" { enabled = true api_key = "1234342-4234243-4234-2" routing_key = "My team" - notify_when_ok = false - notify_when_resolved = false send_test_notification = false } ``` @@ -36,11 +34,9 @@ resource "sysdig_secure_notification_channel_victorops" "sample-victorops" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional) Send a new notification when the alert condition is - no longer triggered. Default is false. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. -* `notify_when_resolved` - (Optional) Send a new notification when the alert is manually - acknowledged by a user. Default is false. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/secure_notification_channel_webhook.md b/website/docs/r/secure_notification_channel_webhook.md index 571631557..0986a011b 100644 --- a/website/docs/r/secure_notification_channel_webhook.md +++ b/website/docs/r/secure_notification_channel_webhook.md @@ -19,8 +19,6 @@ resource "sysdig_secure_notification_channel_webhook" "sample-webhook" { name = "Example Channel - Webhook" enabled = true url = "localhost:8080" - notify_when_ok = false - notify_when_resolved = false send_test_notification = false custom_data = { @@ -40,11 +38,9 @@ resource "sysdig_secure_notification_channel_webhook" "sample-webhook" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional) Send a new notification when the alert condition is - no longer triggered. Default is false. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. -* `notify_when_resolved` - (Optional) Send a new notification when the alert is manually - acknowledged by a user. Default is false. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. From d5cea3881fe8e150c281a91df93f5257c0d0dc8e Mon Sep 17 00:00:00 2001 From: Diego Bonfigli Date: Fri, 9 Jan 2026 14:51:27 +0100 Subject: [PATCH 2/2] avoid removing defaults for notify_when_ok and notify_when_resolved --- sysdig/internal/client/v2/model.go | 6 +- ...dig_monitor_notification_channel_common.go | 62 ++++--------------- ...otification_channel_custom_webhook_test.go | 21 ------- ...sdig_secure_notification_channel_common.go | 62 ++++--------------- website/docs/r/monitor_alert_v2_change.md | 2 +- website/docs/r/monitor_alert_v2_downtime.md | 2 +- website/docs/r/monitor_alert_v2_event.md | 2 +- .../monitor_alert_v2_form_based_prometheus.md | 2 +- .../docs/r/monitor_alert_v2_group_outlier.md | 2 +- website/docs/r/monitor_alert_v2_metric.md | 2 +- website/docs/r/monitor_alert_v2_prometheus.md | 2 +- ...tor_notification_channel_custom_webhook.md | 4 +- .../r/monitor_notification_channel_email.md | 4 +- ...onitor_notification_channel_google_chat.md | 4 +- ...fication_channel_ibm_event_notification.md | 4 +- .../r/monitor_notification_channel_msteams.md | 4 +- .../monitor_notification_channel_opsgenie.md | 4 +- .../monitor_notification_channel_pagerduty.md | 4 +- ...cation_channel_prometheus_alert_manager.md | 4 +- .../r/monitor_notification_channel_slack.md | 4 +- .../r/monitor_notification_channel_sns.md | 4 +- ...monitor_notification_channel_team_email.md | 4 +- .../monitor_notification_channel_victorops.md | 4 +- .../r/monitor_notification_channel_webhook.md | 4 +- .../r/secure_notification_channel_email.md | 4 +- .../r/secure_notification_channel_msteams.md | 4 +- .../r/secure_notification_channel_opsgenie.md | 4 +- .../secure_notification_channel_pagerduty.md | 4 +- ...cation_channel_prometheus_alert_manager.md | 4 +- .../r/secure_notification_channel_slack.md | 4 +- .../docs/r/secure_notification_channel_sns.md | 4 +- .../secure_notification_channel_team_email.md | 4 +- .../secure_notification_channel_victorops.md | 4 +- .../r/secure_notification_channel_webhook.md | 4 +- 34 files changed, 80 insertions(+), 177 deletions(-) diff --git a/sysdig/internal/client/v2/model.go b/sysdig/internal/client/v2/model.go index 71b2fc7c0..b8112995e 100644 --- a/sysdig/internal/client/v2/model.go +++ b/sysdig/internal/client/v2/model.go @@ -138,9 +138,9 @@ type NotificationChannelOptions struct { CustomData map[string]any `json:"customData,omitempty"` // Type: ibm function, Webhook TemplateConfiguration []NotificationChannelTemplateConfiguration `json:"templateConfiguration,omitempty"` // Type: slack, ms teams - NotifyOnOk *bool `json:"notifyOnOk,omitempty"` - NotifyOnResolve *bool `json:"notifyOnResolve,omitempty"` - SendTestNotification bool `json:"sendTestNotification"` + NotifyOnOk bool `json:"notifyOnOk"` + NotifyOnResolve bool `json:"notifyOnResolve"` + SendTestNotification bool `json:"sendTestNotification"` } type NotificationChannel struct { diff --git a/sysdig/resource_sysdig_monitor_notification_channel_common.go b/sysdig/resource_sysdig_monitor_notification_channel_common.go index e06d13541..14848ff9a 100644 --- a/sysdig/resource_sysdig_monitor_notification_channel_common.go +++ b/sysdig/resource_sysdig_monitor_notification_channel_common.go @@ -3,7 +3,6 @@ package sysdig import ( v2 "github.com/draios/terraform-provider-sysdig/sysdig/internal/client/v2" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) func createMonitorNotificationChannelSchema(original map[string]*schema.Schema) map[string]*schema.Schema { @@ -23,16 +22,16 @@ func createMonitorNotificationChannelSchema(original map[string]*schema.Schema) Default: false, }, "notify_when_ok": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{"true", "false"}, false), - Deprecated: "The notify_when_ok field is deprecated and will be removed in a future version. This flag has been replaced by the `notify_on_resolve` field inside `notification_channels` when defining an alert resource.", + Type: schema.TypeBool, + Optional: true, + Default: false, + Deprecated: "The notify_when_ok field is deprecated and will be removed in a future version. This flag has been replaced by the `notify_on_resolve` field inside `notification_channels` when defining an alert resource.", }, "notify_when_resolved": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{"true", "false"}, false), - Deprecated: "The notify_when_resolved field is deprecated and will be removed in a future version. This flag has been replaced by the `notify_on_acknowledge` field inside `notification_channels` when defining an alert resource.", + Type: schema.TypeBool, + Optional: true, + Default: false, + Deprecated: "The notify_when_resolved field is deprecated and will be removed in a future version. This flag has been replaced by the `notify_on_acknowledge` field inside `notification_channels` when defining an alert resource.", }, "version": { Type: schema.TypeInt, @@ -59,35 +58,13 @@ func monitorNotificationChannelFromResourceData(d *schema.ResourceData, teamID i tID = &teamID } - var notifyOnOk *bool = nil - if onOk, ok := d.GetOk("notify_when_ok"); ok && onOk.(string) != "" { - if onOk.(string) == "true" { - trueValue := true - notifyOnOk = &trueValue - } else { - falseValue := false - notifyOnOk = &falseValue - } - } - - var notifyOnResolve *bool = nil - if onResolve, ok := d.GetOk("notify_when_resolved"); ok && onResolve.(string) != "" { - if onResolve.(string) == "true" { - trueValue := true - notifyOnResolve = &trueValue - } else { - falseValue := false - notifyOnResolve = &falseValue - } - } - nc = v2.NotificationChannel{ Name: d.Get("name").(string), Enabled: d.Get("enabled").(bool), TeamID: tID, Options: v2.NotificationChannelOptions{ - NotifyOnOk: notifyOnOk, - NotifyOnResolve: notifyOnResolve, + NotifyOnOk: d.Get("notify_when_ok").(bool), + NotifyOnResolve: d.Get("notify_when_resolved").(bool), SendTestNotification: d.Get("send_test_notification").(bool), }, } @@ -107,23 +84,8 @@ func monitorNotificationChannelToResourceData(nc *v2.NotificationChannel, data * if err != nil { return err } - - if nc.Options.NotifyOnOk != nil { - if *nc.Options.NotifyOnOk { - _ = data.Set("notify_when_ok", "true") - } else { - _ = data.Set("notify_when_ok", "false") - } - } - - if nc.Options.NotifyOnResolve != nil { - if *nc.Options.NotifyOnResolve { - _ = data.Set("notify_when_resolved", "true") - } else { - _ = data.Set("notify_when_resolved", "false") - } - } - + _ = data.Set("notify_when_ok", nc.Options.NotifyOnOk) + _ = data.Set("notify_when_resolved", nc.Options.NotifyOnResolve) // do not update "send_test_notification" from the api response as it will always be "false" on subsequent reads because the fields is not persisted return err diff --git a/sysdig/resource_sysdig_monitor_notification_channel_custom_webhook_test.go b/sysdig/resource_sysdig_monitor_notification_channel_custom_webhook_test.go index 68f0da672..bd7eb8d97 100644 --- a/sysdig/resource_sysdig_monitor_notification_channel_custom_webhook_test.go +++ b/sysdig/resource_sysdig_monitor_notification_channel_custom_webhook_test.go @@ -69,15 +69,6 @@ func TestAccMonitorNotificationChannelCustomWebhook(t *testing.T) { ImportStateVerify: true, ImportStateVerifyIgnore: []string{"send_test_notification"}, }, - { - Config: monitorNotificationChannelCustomWebhookWithoutNotifyFields(rText()), - }, - { - ResourceName: "sysdig_monitor_notification_channel_custom_webhook.sample-custom-webhook6", - ImportState: true, - ImportStateVerify: true, - ImportStateVerifyIgnore: []string{"send_test_notification"}, - }, }, }) } @@ -159,15 +150,3 @@ func monitorNotificationChannelCustomWebhookSharedWithAdditionalHeaders(name str send_test_notification = false }`, name) } - -func monitorNotificationChannelCustomWebhookWithoutNotifyFields(name string) string { - return fmt.Sprintf(` -resource "sysdig_monitor_notification_channel_custom_webhook" "sample-custom-webhook6" { - name = "Example Channel %s - Custom Webhook" - enabled = true - url = "https://example.com/" - http_method = "POST" - template = "{\n \"code\": \"incident\",\n \"alert\": \"{{@alert_name}}\"\n}" - send_test_notification = false -}`, name) -} diff --git a/sysdig/resource_sysdig_secure_notification_channel_common.go b/sysdig/resource_sysdig_secure_notification_channel_common.go index b1b592af8..b314ffa88 100644 --- a/sysdig/resource_sysdig_secure_notification_channel_common.go +++ b/sysdig/resource_sysdig_secure_notification_channel_common.go @@ -3,7 +3,6 @@ package sysdig import ( v2 "github.com/draios/terraform-provider-sysdig/sysdig/internal/client/v2" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) func createSecureNotificationChannelSchema(original map[string]*schema.Schema) map[string]*schema.Schema { @@ -23,16 +22,16 @@ func createSecureNotificationChannelSchema(original map[string]*schema.Schema) m Default: false, }, "notify_when_ok": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{"true", "false"}, false), - Deprecated: "The notify_when_ok field is deprecated and will be removed in a future version. This flag has been replaced by the `notify_on_resolve` field inside `notification_channels` when defining an alert resource.", + Type: schema.TypeBool, + Optional: true, + Default: false, + Deprecated: "The notify_when_ok field is deprecated and will be removed in a future version. This flag has been replaced by the `notify_on_resolve` field inside `notification_channels` when defining an alert resource.", }, "notify_when_resolved": { - Type: schema.TypeString, - Optional: true, - ValidateFunc: validation.StringInSlice([]string{"true", "false"}, false), - Deprecated: "The notify_when_resolved field is deprecated and will be removed in a future version. This flag has been replaced by the `notify_on_acknowledge` field inside `notification_channels` when defining an alert resource.", + Type: schema.TypeBool, + Optional: true, + Default: false, + Deprecated: "The notify_when_resolved field is deprecated and will be removed in a future version. This flag has been replaced by the `notify_on_acknowledge` field inside `notification_channels` when defining an alert resource.", }, "version": { Type: schema.TypeInt, @@ -59,35 +58,13 @@ func secureNotificationChannelFromResourceData(d *schema.ResourceData, teamID in tID = &teamID } - var notifyOnOk *bool = nil - if onOk, ok := d.GetOk("notify_when_ok"); ok && onOk.(string) != "" { - if onOk.(string) == "true" { - trueValue := true - notifyOnOk = &trueValue - } else { - falseValue := false - notifyOnOk = &falseValue - } - } - - var notifyOnResolve *bool = nil - if onResolve, ok := d.GetOk("notify_when_resolved"); ok && onResolve.(string) != "" { - if onResolve.(string) == "true" { - trueValue := true - notifyOnResolve = &trueValue - } else { - falseValue := false - notifyOnResolve = &falseValue - } - } - nc = v2.NotificationChannel{ Name: d.Get("name").(string), Enabled: d.Get("enabled").(bool), TeamID: tID, Options: v2.NotificationChannelOptions{ - NotifyOnOk: notifyOnOk, - NotifyOnResolve: notifyOnResolve, + NotifyOnOk: d.Get("notify_when_ok").(bool), + NotifyOnResolve: d.Get("notify_when_resolved").(bool), SendTestNotification: d.Get("send_test_notification").(bool), }, } @@ -107,23 +84,8 @@ func secureNotificationChannelToResourceData(nc *v2.NotificationChannel, data *s if err != nil { return err } - - if nc.Options.NotifyOnOk != nil { - if *nc.Options.NotifyOnOk { - _ = data.Set("notify_when_ok", "true") - } else { - _ = data.Set("notify_when_ok", "false") - } - } - - if nc.Options.NotifyOnResolve != nil { - if *nc.Options.NotifyOnResolve { - _ = data.Set("notify_when_resolved", "true") - } else { - _ = data.Set("notify_when_resolved", "false") - } - } - + _ = data.Set("notify_when_ok", nc.Options.NotifyOnOk) + _ = data.Set("notify_when_resolved", nc.Options.NotifyOnResolve) // do not update "send_test_notification" from the api response as it will always be "false" on subsequent reads because the fields is not persisted return err diff --git a/website/docs/r/monitor_alert_v2_change.md b/website/docs/r/monitor_alert_v2_change.md index 25d7982fa..ff172fe19 100644 --- a/website/docs/r/monitor_alert_v2_change.md +++ b/website/docs/r/monitor_alert_v2_change.md @@ -76,7 +76,7 @@ It is a list of objects with the following fields: * `id` - (Required) The ID of the notification channel. * `renotify_every_minutes` - (Optional) the amount of minutes to wait before re sending the notification to this channel. `0` means no renotification enabled. Default: `0`. * `notify_on_resolve` - (Optional) Whether to send a notification when the alert is resolved. Default: `true`. -* `notify_on_acknowledge` - (Optional) Whether to send a notification when the alert is acknowledged. If not defined, this option is inherited from the `notify_when_resolved` option from the specific notification channel selected. If it is not defined there, the default is to send notification on acknowledgement. +* `notify_on_acknowledge` - (Optional) Whether to send a notification when the alert is acknowledged. If not defined, this option is inherited from the `notify_when_resolved` option from the specific notification channel selected. * `main_threshold` - (Optional) Whether this notification channel is used for the main threshold of the alert. Default: `true`. * `warning_threshold` - (Optional) Whether this notification channel is used for the warning threshold of the alert. Default: `false`. diff --git a/website/docs/r/monitor_alert_v2_downtime.md b/website/docs/r/monitor_alert_v2_downtime.md index 93306dfb6..6300085cc 100644 --- a/website/docs/r/monitor_alert_v2_downtime.md +++ b/website/docs/r/monitor_alert_v2_downtime.md @@ -64,7 +64,7 @@ It is a list of objects with the following fields: * `id` - (Required) The ID of the notification channel. * `renotify_every_minutes` - (Optional) the amount of minutes to wait before re sending the notification to this channel. `0` means no renotification enabled. Default: `0`. * `notify_on_resolve` - (Optional) Whether to send a notification when the alert is resolved. Default: `true`. -* `notify_on_acknowledge` - (Optional) Whether to send a notification when the alert is acknowledged. If not defined, this option is inherited from the `notify_when_resolved` option from the specific notification channel selected. If it is not defined there, the default is to send notification on acknowledgement. +* `notify_on_acknowledge` - (Optional) Whether to send a notification when the alert is acknowledged. If not defined, this option is inherited from the `notify_when_resolved` option from the specific notification channel selected. ### `custom_notification` diff --git a/website/docs/r/monitor_alert_v2_event.md b/website/docs/r/monitor_alert_v2_event.md index dee774d9f..389091912 100644 --- a/website/docs/r/monitor_alert_v2_event.md +++ b/website/docs/r/monitor_alert_v2_event.md @@ -74,7 +74,7 @@ It is a list of objects with the following fields: * `id` - (Required) The ID of the notification channel. * `renotify_every_minutes` - (Optional) the amount of minutes to wait before re sending the notification to this channel. `0` means no renotification enabled. Default: `0`. * `notify_on_resolve` - (Optional) Whether to send a notification when the alert is resolved. Default: `true`. -* `notify_on_acknowledge` - (Optional) Whether to send a notification when the alert is acknowledged. If not defined, this option is inherited from the `notify_when_resolved` option from the specific notification channel selected. If it is not defined there, the default is to send notification on acknowledgement. +* `notify_on_acknowledge` - (Optional) Whether to send a notification when the alert is acknowledged. If not defined, this option is inherited from the `notify_when_resolved` option from the specific notification channel selected. * `main_threshold` - (Optional) Whether this notification channel is used for the main threshold of the alert. Default: `true`. * `warning_threshold` - (Optional) Whether this notification channel is used for the warning threshold of the alert. Default: `false`. diff --git a/website/docs/r/monitor_alert_v2_form_based_prometheus.md b/website/docs/r/monitor_alert_v2_form_based_prometheus.md index 2e1fca125..c10674742 100644 --- a/website/docs/r/monitor_alert_v2_form_based_prometheus.md +++ b/website/docs/r/monitor_alert_v2_form_based_prometheus.md @@ -55,7 +55,7 @@ It is a list of objects with the following fields: * `id` - (Required) The ID of the notification channel. * `renotify_every_minutes` - (Optional) the amount of minutes to wait before re sending the notification to this channel. `0` means no renotification enabled. * `notify_on_resolve` - (Optional) Whether to send a notification when the alert is resolved. Default: `true`. -* `notify_on_acknowledge` - (Optional) Whether to send a notification when the alert is acknowledged. If not defined, this option is inherited from the `notify_when_resolved` option from the specific notification channel selected. If it is not defined there, the default is to send notification on acknowledgement. +* `notify_on_acknowledge` - (Optional) Whether to send a notification when the alert is acknowledged. If not defined, this option is inherited from the `notify_when_resolved` option from the specific notification channel selected. * `main_threshold` - (Optional) Whether this notification channel is used for the main threshold of the alert. Default: `true`. * `warning_threshold` - (Optional) Whether this notification channel is used for the warning threshold of the alert. Default: `false`. diff --git a/website/docs/r/monitor_alert_v2_group_outlier.md b/website/docs/r/monitor_alert_v2_group_outlier.md index 714bbe929..5a51652d8 100644 --- a/website/docs/r/monitor_alert_v2_group_outlier.md +++ b/website/docs/r/monitor_alert_v2_group_outlier.md @@ -76,7 +76,7 @@ It is a list of objects with the following fields: * `id` - (Required) The ID of the notification channel. * `renotify_every_minutes` - (Optional) the amount of minutes to wait before re sending the notification to this channel. `0` means no renotification enabled. Default: `0`. * `notify_on_resolve` - (Optional) Whether to send a notification when the alert is resolved. Default: `true`. -* `notify_on_acknowledge` - (Optional) Whether to send a notification when the alert is acknowledged. If not defined, this option is inherited from the `notify_when_resolved` option from the specific notification channel selected. If it is not defined there, the default is to send notification on acknowledgement. +* `notify_on_acknowledge` - (Optional) Whether to send a notification when the alert is acknowledged. If not defined, this option is inherited from the `notify_when_resolved` option from the specific notification channel selected. * `main_threshold` - (Optional) Whether this notification channel is used for the main threshold of the alert. Default: `true`. * `warning_threshold` - (Optional) Whether this notification channel is used for the warning threshold of the alert. Default: `false`. diff --git a/website/docs/r/monitor_alert_v2_metric.md b/website/docs/r/monitor_alert_v2_metric.md index 9c122bf3c..96c151e15 100644 --- a/website/docs/r/monitor_alert_v2_metric.md +++ b/website/docs/r/monitor_alert_v2_metric.md @@ -91,7 +91,7 @@ It is a list of objects with the following fields: * `id` - (Required) The ID of the notification channel. * `renotify_every_minutes` - (Optional) the amount of minutes to wait before re sending the notification to this channel. `0` means no renotification enabled. Default: `0`. * `notify_on_resolve` - (Optional) Whether to send a notification when the alert is resolved. Default: `true`. -* `notify_on_acknowledge` - (Optional) Whether to send a notification when the alert is acknowledged. If not defined, this option is inherited from the `notify_when_resolved` option from the specific notification channel selected. If it is not defined there, the default is to send notification on acknowledgement. +* `notify_on_acknowledge` - (Optional) Whether to send a notification when the alert is acknowledged. If not defined, this option is inherited from the `notify_when_resolved` option from the specific notification channel selected. * `main_threshold` - (Optional) Whether this notification channel is used for the main threshold of the alert. Default: `true`. * `warning_threshold` - (Optional) Whether this notification channel is used for the warning threshold of the alert. Default: `false`. diff --git a/website/docs/r/monitor_alert_v2_prometheus.md b/website/docs/r/monitor_alert_v2_prometheus.md index ca87d4283..7692f52a3 100644 --- a/website/docs/r/monitor_alert_v2_prometheus.md +++ b/website/docs/r/monitor_alert_v2_prometheus.md @@ -57,7 +57,7 @@ It is a list of objects with the following fields: * `id` - (Required) The ID of the notification channel. * `renotify_every_minutes` - (Optional) the amount of minutes to wait before re sending the notification to this channel. `0` means no renotification enabled. * `notify_on_resolve` - (Optional) Whether to send a notification when the alert is resolved. Default: `true`. -* `notify_on_acknowledge` - (Optional) Whether to send a notification when the alert is acknowledged. If not defined, this option is inherited from the `notify_when_resolved` option from the specific notification channel selected. If it is not defined there, the default is to send notification on acknowledgement. +* `notify_on_acknowledge` - (Optional) Whether to send a notification when the alert is acknowledged. If not defined, this option is inherited from the `notify_when_resolved` option from the specific notification channel selected. ### `custom_notification` diff --git a/website/docs/r/monitor_notification_channel_custom_webhook.md b/website/docs/r/monitor_notification_channel_custom_webhook.md index bb2f777d4..9174aeb13 100644 --- a/website/docs/r/monitor_notification_channel_custom_webhook.md +++ b/website/docs/r/monitor_notification_channel_custom_webhook.md @@ -46,9 +46,9 @@ resource "sysdig_monitor_notification_channel_custom_webhook" "sample-custom-web * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `false`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. -* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `false`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/monitor_notification_channel_email.md b/website/docs/r/monitor_notification_channel_email.md index 174a5fe5b..e04b67963 100644 --- a/website/docs/r/monitor_notification_channel_email.md +++ b/website/docs/r/monitor_notification_channel_email.md @@ -32,9 +32,9 @@ resource "sysdig_monitor_notification_channel_email" "sample_email" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `false`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. -* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `false`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/monitor_notification_channel_google_chat.md b/website/docs/r/monitor_notification_channel_google_chat.md index ec21e5fcd..471f8cbca 100644 --- a/website/docs/r/monitor_notification_channel_google_chat.md +++ b/website/docs/r/monitor_notification_channel_google_chat.md @@ -31,9 +31,9 @@ resource "sysdig_monitor_notification_channel_google_chat" "sample-gchat" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `false`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. -* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `false`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/monitor_notification_channel_ibm_event_notification.md b/website/docs/r/monitor_notification_channel_ibm_event_notification.md index 37d53641c..f0f6097b9 100644 --- a/website/docs/r/monitor_notification_channel_ibm_event_notification.md +++ b/website/docs/r/monitor_notification_channel_ibm_event_notification.md @@ -42,9 +42,9 @@ resource "sysdig_monitor_notification_channel_ibm_event_notification" "sample" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `false`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. -* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `false`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/monitor_notification_channel_msteams.md b/website/docs/r/monitor_notification_channel_msteams.md index 37d455e4c..fd4e6c6b7 100644 --- a/website/docs/r/monitor_notification_channel_msteams.md +++ b/website/docs/r/monitor_notification_channel_msteams.md @@ -31,9 +31,9 @@ resource "sysdig_monitor_notification_channel_msteams" "sample-msteams" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `false`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. -* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `false`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/monitor_notification_channel_opsgenie.md b/website/docs/r/monitor_notification_channel_opsgenie.md index b845410db..baf11bc03 100644 --- a/website/docs/r/monitor_notification_channel_opsgenie.md +++ b/website/docs/r/monitor_notification_channel_opsgenie.md @@ -32,9 +32,9 @@ resource "sysdig_monitor_notification_channel_opsgenie" "sample-opsgenie" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `false`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. -* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `false`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/monitor_notification_channel_pagerduty.md b/website/docs/r/monitor_notification_channel_pagerduty.md index cf3667b07..64e0bd23e 100644 --- a/website/docs/r/monitor_notification_channel_pagerduty.md +++ b/website/docs/r/monitor_notification_channel_pagerduty.md @@ -37,9 +37,9 @@ resource "sysdig_monitor_notification_channel_pagerduty" "sample-pagerduty" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `false`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. -* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `false`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/monitor_notification_channel_prometheus_alert_manager.md b/website/docs/r/monitor_notification_channel_prometheus_alert_manager.md index d55f354b1..3465063b7 100644 --- a/website/docs/r/monitor_notification_channel_prometheus_alert_manager.md +++ b/website/docs/r/monitor_notification_channel_prometheus_alert_manager.md @@ -39,9 +39,9 @@ resource "sysdig_monitor_notification_channel_prometheus_alert_manager" "sample" * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `false`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. -* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `false`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/monitor_notification_channel_slack.md b/website/docs/r/monitor_notification_channel_slack.md index 12dd2560e..7fb82c6af 100644 --- a/website/docs/r/monitor_notification_channel_slack.md +++ b/website/docs/r/monitor_notification_channel_slack.md @@ -52,9 +52,9 @@ resource "sysdig_monitor_notification_channel_slack" "sample-slack" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `false`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. -* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `false`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/monitor_notification_channel_sns.md b/website/docs/r/monitor_notification_channel_sns.md index 6e5490c28..ccc4235d7 100644 --- a/website/docs/r/monitor_notification_channel_sns.md +++ b/website/docs/r/monitor_notification_channel_sns.md @@ -31,9 +31,9 @@ resource "sysdig_monitor_notification_channel_sns" "sample-amazon-sns" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `false`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. -* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `false`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/monitor_notification_channel_team_email.md b/website/docs/r/monitor_notification_channel_team_email.md index c8e47834d..9c24e0e15 100644 --- a/website/docs/r/monitor_notification_channel_team_email.md +++ b/website/docs/r/monitor_notification_channel_team_email.md @@ -34,9 +34,9 @@ resource "sysdig_monitor_notification_channel_team_email" "sample-team-email" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `false`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. -* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `false`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/monitor_notification_channel_victorops.md b/website/docs/r/monitor_notification_channel_victorops.md index 3bb67039c..2c53934fb 100644 --- a/website/docs/r/monitor_notification_channel_victorops.md +++ b/website/docs/r/monitor_notification_channel_victorops.md @@ -34,9 +34,9 @@ resource "sysdig_monitor_notification_channel_victorops" "sample-victorops" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `false`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. -* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `false`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/monitor_notification_channel_webhook.md b/website/docs/r/monitor_notification_channel_webhook.md index 2f11996db..16f86fc1e 100644 --- a/website/docs/r/monitor_notification_channel_webhook.md +++ b/website/docs/r/monitor_notification_channel_webhook.md @@ -42,9 +42,9 @@ resource "sysdig_monitor_notification_channel_webhook" "sample-webhook" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `false`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. -* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `false`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/secure_notification_channel_email.md b/website/docs/r/secure_notification_channel_email.md index 41d417510..7bffd0309 100644 --- a/website/docs/r/secure_notification_channel_email.md +++ b/website/docs/r/secure_notification_channel_email.md @@ -32,9 +32,9 @@ resource "sysdig_secure_notification_channel_email" "sample_email" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `false`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. -* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `false`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/secure_notification_channel_msteams.md b/website/docs/r/secure_notification_channel_msteams.md index e89d665a3..193e753ef 100644 --- a/website/docs/r/secure_notification_channel_msteams.md +++ b/website/docs/r/secure_notification_channel_msteams.md @@ -31,9 +31,9 @@ resource "sysdig_secure_notification_channel_msteams" "sample-msteams" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `false`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. -* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `false`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/secure_notification_channel_opsgenie.md b/website/docs/r/secure_notification_channel_opsgenie.md index bdfbdce5d..cb00a7218 100644 --- a/website/docs/r/secure_notification_channel_opsgenie.md +++ b/website/docs/r/secure_notification_channel_opsgenie.md @@ -32,9 +32,9 @@ resource "sysdig_secure_notification_channel_opsgenie" "sample-opsgenie" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `false`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. -* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `false`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/secure_notification_channel_pagerduty.md b/website/docs/r/secure_notification_channel_pagerduty.md index 518b054ed..aa1dad1fd 100644 --- a/website/docs/r/secure_notification_channel_pagerduty.md +++ b/website/docs/r/secure_notification_channel_pagerduty.md @@ -37,9 +37,9 @@ resource "sysdig_secure_notification_channel_pagerduty" "sample-pagerduty" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `false`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. -* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `false`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/secure_notification_channel_prometheus_alert_manager.md b/website/docs/r/secure_notification_channel_prometheus_alert_manager.md index b04b19b20..1c946367d 100644 --- a/website/docs/r/secure_notification_channel_prometheus_alert_manager.md +++ b/website/docs/r/secure_notification_channel_prometheus_alert_manager.md @@ -39,9 +39,9 @@ resource "sysdig_secure_notification_channel_prometheus_alert_manager" "sample" * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `false`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. -* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `false`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/secure_notification_channel_slack.md b/website/docs/r/secure_notification_channel_slack.md index 4a331152a..ed65ffd75 100644 --- a/website/docs/r/secure_notification_channel_slack.md +++ b/website/docs/r/secure_notification_channel_slack.md @@ -39,9 +39,9 @@ resource "sysdig_secure_notification_channel_slack" "sample-slack" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `false`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. -* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `false`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/secure_notification_channel_sns.md b/website/docs/r/secure_notification_channel_sns.md index 3c026b608..044b49e81 100644 --- a/website/docs/r/secure_notification_channel_sns.md +++ b/website/docs/r/secure_notification_channel_sns.md @@ -31,9 +31,9 @@ resource "sysdig_secure_notification_channel_sns" "sample-amazon-sns" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `false`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. -* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `false`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/secure_notification_channel_team_email.md b/website/docs/r/secure_notification_channel_team_email.md index 576a67c71..8997ea22b 100644 --- a/website/docs/r/secure_notification_channel_team_email.md +++ b/website/docs/r/secure_notification_channel_team_email.md @@ -34,9 +34,9 @@ resource "sysdig_secure_notification_channel_team_email" "sample-team-email" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `false`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. -* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `false`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/secure_notification_channel_victorops.md b/website/docs/r/secure_notification_channel_victorops.md index a1358360b..c4366a9b6 100644 --- a/website/docs/r/secure_notification_channel_victorops.md +++ b/website/docs/r/secure_notification_channel_victorops.md @@ -34,9 +34,9 @@ resource "sysdig_secure_notification_channel_victorops" "sample-victorops" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `false`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. -* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `false`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false. diff --git a/website/docs/r/secure_notification_channel_webhook.md b/website/docs/r/secure_notification_channel_webhook.md index 0986a011b..68a7b17e7 100644 --- a/website/docs/r/secure_notification_channel_webhook.md +++ b/website/docs/r/secure_notification_channel_webhook.md @@ -38,9 +38,9 @@ resource "sysdig_secure_notification_channel_webhook" "sample-webhook" { * `enabled` - (Optional) If false, the channel will not emit notifications. Default is true. -* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `true`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. +* `notify_when_ok` - (Optional, Deprecated) Send a new notification when the alert condition is no longer triggered. Default is `false`. This option is deprecated; use `notify_on_resolve` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. -* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `true`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. +* `notify_when_resolved` - (Optional, Deprecated) Send a new notification when the alert is manually acknowledged by a user. Default is `false`. This option is deprecated; use `notify_on_acknowledge` within the `notification_channels` options in the `sysdig_monitor_alert_v2_*` resources instead, which takes precedence over this setting. This option only applies to Monitor alerts when the channel is shared across all teams. It has no effect on Secure features. * `send_test_notification` - (Optional) Send an initial test notification to check if the notification channel is working. Default is false.