From e3e7c4e7417c369ed4d145896348d7d46eed7813 Mon Sep 17 00:00:00 2001 From: Diego Bonfigli Date: Fri, 9 Aug 2024 12:37:44 +0200 Subject: [PATCH] chore(alerts): fix doc (#544) --- sysdig/resource_sysdig_monitor_alert_v2_downtime.go | 2 +- sysdig/resource_sysdig_monitor_alert_v2_event.go | 2 +- sysdig/resource_sysdig_monitor_alert_v2_metric.go | 2 +- sysdig/resource_sysdig_monitor_alert_v2_prometheus.go | 2 +- website/docs/r/monitor_alert_v2_form_based_prometheus.md | 2 +- website/docs/r/monitor_alert_v2_metric.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sysdig/resource_sysdig_monitor_alert_v2_downtime.go b/sysdig/resource_sysdig_monitor_alert_v2_downtime.go index 31f5c619..ed92c543 100644 --- a/sysdig/resource_sysdig_monitor_alert_v2_downtime.go +++ b/sysdig/resource_sysdig_monitor_alert_v2_downtime.go @@ -192,7 +192,7 @@ func buildAlertV2DowntimeStruct(d *schema.ResourceData) *v2.AlertV2Downtime { if d.HasChange("trigger_after_minutes") { // GetOk returns true even if the value is stored only in the state and not in the user config: // to avoid applying a trigger_after_minutes old value from the state even if the user removed it from the config - // we use HasChange that is true only if the use has changed (or created) it - and so it must be in the config + // we use HasChange that is true only if the user has changed (or created) it - and so it must be in the config if attr, ok := d.GetOk("trigger_after_minutes"); ok && attr != nil { config.Range = minutesToSeconds(d.Get("trigger_after_minutes").(int)) } diff --git a/sysdig/resource_sysdig_monitor_alert_v2_event.go b/sysdig/resource_sysdig_monitor_alert_v2_event.go index 34131c33..82c47f8f 100644 --- a/sysdig/resource_sysdig_monitor_alert_v2_event.go +++ b/sysdig/resource_sysdig_monitor_alert_v2_event.go @@ -220,7 +220,7 @@ func buildAlertV2EventStruct(d *schema.ResourceData) (*v2.AlertV2Event, error) { if d.HasChange("trigger_after_minutes") { // GetOk returns true even if the value is stored only in the state and not in the user config: // to avoid applying a trigger_after_minutes old value from the state even if the user removed it from the config - // we use HasChange that is true only if the use has changed (or created) it - and so it must be in the config + // we use HasChange that is true only if the user has changed (or created) it - and so it must be in the config if attr, ok := d.GetOk("trigger_after_minutes"); ok && attr != nil { config.Range = minutesToSeconds(d.Get("trigger_after_minutes").(int)) } diff --git a/sysdig/resource_sysdig_monitor_alert_v2_metric.go b/sysdig/resource_sysdig_monitor_alert_v2_metric.go index 2f4e2ae9..1d5466cc 100644 --- a/sysdig/resource_sysdig_monitor_alert_v2_metric.go +++ b/sysdig/resource_sysdig_monitor_alert_v2_metric.go @@ -239,7 +239,7 @@ func buildAlertV2MetricStruct(d *schema.ResourceData) (*v2.AlertV2Metric, error) if d.HasChange("trigger_after_minutes") { // GetOk returns true even if the value is stored only in the state and not in the user config: // to avoid applying a trigger_after_minutes old value from the state even if the user removed it from the config - // we use HasChange that is true only if the use has changed (or created) it - and so it must be in the config + // we use HasChange that is true only if the user has changed (or created) it - and so it must be in the config if attr, ok := d.GetOk("trigger_after_minutes"); ok && attr != nil { config.Range = minutesToSeconds(d.Get("trigger_after_minutes").(int)) } diff --git a/sysdig/resource_sysdig_monitor_alert_v2_prometheus.go b/sysdig/resource_sysdig_monitor_alert_v2_prometheus.go index c737ddab..e3648227 100644 --- a/sysdig/resource_sysdig_monitor_alert_v2_prometheus.go +++ b/sysdig/resource_sysdig_monitor_alert_v2_prometheus.go @@ -174,7 +174,7 @@ func buildAlertV2PrometheusStruct(d *schema.ResourceData) *v2.AlertV2Prometheus if d.HasChange("trigger_after_minutes") { // GetOk returns true even if the value is stored only in the state and not in the user config: // to avoid applying a trigger_after_minutes old value from the state even if the user removed it from the config - // we use HasChange that is true only if the use has changed (or created) it - and so it must be in the config + // we use HasChange that is true only if the user has changed (or created) it - and so it must be in the config if attr, ok := d.GetOk("trigger_after_minutes"); ok && attr != nil { config.Duration = minutesToSeconds(d.Get("trigger_after_minutes").(int)) } 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 3c61bb92..cac1faf1 100644 --- a/website/docs/r/monitor_alert_v2_form_based_prometheus.md +++ b/website/docs/r/monitor_alert_v2_form_based_prometheus.md @@ -8,7 +8,7 @@ description: |- # Resource: sysdig_monitor_alert_v2_form_based_prometheus --> **Note:** Note: Form Based Prometheus Alerts are now part of Threshold Alerts. The Terraform resource remains `sysdig_monitor_alert_v2_form_based_prometheus` for backwards compatibility. +-> **Note:** Form Based Prometheus Alerts are now part of Threshold Alerts. The Terraform resource remains `sysdig_monitor_alert_v2_form_based_prometheus` for backwards compatibility. Threshold Alerts configured with PromQL allow you to monitor your infrastructure by comparing any PromQL expression against user-defined thresholds. diff --git a/website/docs/r/monitor_alert_v2_metric.md b/website/docs/r/monitor_alert_v2_metric.md index aa9f1318..b85ae7d4 100644 --- a/website/docs/r/monitor_alert_v2_metric.md +++ b/website/docs/r/monitor_alert_v2_metric.md @@ -8,7 +8,7 @@ description: |- # Resource: sysdig_monitor_alert_v2_metric --> **Note:**: Metric Alerts have been renamed to Threshold Alerts. The Terraform resource remains `sysdig_monitor_alert_v2_metric` for backwards compatibility. +-> **Note:** Metric Alerts have been renamed to Threshold Alerts. The Terraform resource remains `sysdig_monitor_alert_v2_metric` for backwards compatibility. Monitor your infrastructure by comparing any metric against user-defined thresholds.