Skip to content

Commit

Permalink
chore(alerts): fix doc (#544)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbonf authored Aug 9, 2024
1 parent 2158560 commit e3e7c4e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion sysdig/resource_sysdig_monitor_alert_v2_downtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down
2 changes: 1 addition & 1 deletion sysdig/resource_sysdig_monitor_alert_v2_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down
2 changes: 1 addition & 1 deletion sysdig/resource_sysdig_monitor_alert_v2_metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down
2 changes: 1 addition & 1 deletion sysdig/resource_sysdig_monitor_alert_v2_prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/monitor_alert_v2_form_based_prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/monitor_alert_v2_metric.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit e3e7c4e

Please sign in to comment.