Skip to content

Commit 26dd91c

Browse files
authored
feat(monitor): deprecate v1 alert resources (#536)
1 parent 323ff44 commit 26dd91c

8 files changed

+28
-16
lines changed

sysdig/resource_sysdig_monitor_alert_downtime.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ func resourceSysdigMonitorAlertDowntime() *schema.Resource {
1717
timeout := 5 * time.Minute
1818

1919
return &schema.Resource{
20-
CreateContext: resourceSysdigAlertDowntimeCreate,
21-
UpdateContext: resourceSysdigAlertDowntimeUpdate,
22-
ReadContext: resourceSysdigAlertDowntimeRead,
23-
DeleteContext: resourceSysdigAlertDowntimeDelete,
20+
DeprecationMessage: "\"sysdig_monitor_alert_downtime\" has been deprecated and will be removed in future releases, use \"sysdig_monitor_alert_v2_downtime\" instead",
21+
CreateContext: resourceSysdigAlertDowntimeCreate,
22+
UpdateContext: resourceSysdigAlertDowntimeUpdate,
23+
ReadContext: resourceSysdigAlertDowntimeRead,
24+
DeleteContext: resourceSysdigAlertDowntimeDelete,
2425
Importer: &schema.ResourceImporter{
2526
StateContext: schema.ImportStatePassthroughContext,
2627
},

sysdig/resource_sysdig_monitor_alert_event.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ func resourceSysdigMonitorAlertEvent() *schema.Resource {
1717
timeout := 5 * time.Minute
1818

1919
return &schema.Resource{
20-
CreateContext: resourceSysdigAlertEventCreate,
21-
UpdateContext: resourceSysdigAlertEventUpdate,
22-
ReadContext: resourceSysdigAlertEventRead,
23-
DeleteContext: resourceSysdigAlertEventDelete,
20+
DeprecationMessage: "\"sysdig_monitor_alert_event\" has been deprecated and will be removed in future releases, use \"sysdig_monitor_alert_v2_event\" instead",
21+
CreateContext: resourceSysdigAlertEventCreate,
22+
UpdateContext: resourceSysdigAlertEventUpdate,
23+
ReadContext: resourceSysdigAlertEventRead,
24+
DeleteContext: resourceSysdigAlertEventDelete,
2425
Importer: &schema.ResourceImporter{
2526
StateContext: schema.ImportStatePassthroughContext,
2627
},

sysdig/resource_sysdig_monitor_alert_metric.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ func resourceSysdigMonitorAlertMetric() *schema.Resource {
1515
timeout := 5 * time.Minute
1616

1717
return &schema.Resource{
18-
CreateContext: resourceSysdigAlertMetricCreate,
19-
UpdateContext: resourceSysdigAlertMetricUpdate,
20-
ReadContext: resourceSysdigAlertMetricRead,
21-
DeleteContext: resourceSysdigAlertMetricDelete,
18+
DeprecationMessage: "\"sysdig_monitor_alert_metric\" has been deprecated and will be removed in future releases, use \"sysdig_monitor_alert_v2_metric\" instead",
19+
CreateContext: resourceSysdigAlertMetricCreate,
20+
UpdateContext: resourceSysdigAlertMetricUpdate,
21+
ReadContext: resourceSysdigAlertMetricRead,
22+
DeleteContext: resourceSysdigAlertMetricDelete,
2223
Importer: &schema.ResourceImporter{
2324
StateContext: schema.ImportStatePassthroughContext,
2425
},

sysdig/resource_sysdig_monitor_alert_promql.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ func resourceSysdigMonitorAlertPromql() *schema.Resource {
1515
timeout := 5 * time.Minute
1616

1717
return &schema.Resource{
18-
CreateContext: resourceSysdigAlertPromqlCreate,
19-
UpdateContext: resourceSysdigAlertPromqlUpdate,
20-
ReadContext: resourceSysdigAlertPromqlRead,
21-
DeleteContext: resourceSysdigAlertPromqlDelete,
18+
DeprecationMessage: "\"sysdig_monitor_alert_promql\" has been deprecated and will be removed in future releases, use \"sysdig_monitor_alert_v2_prometheus\" instead",
19+
CreateContext: resourceSysdigAlertPromqlCreate,
20+
UpdateContext: resourceSysdigAlertPromqlUpdate,
21+
ReadContext: resourceSysdigAlertPromqlRead,
22+
DeleteContext: resourceSysdigAlertPromqlDelete,
2223
Importer: &schema.ResourceImporter{
2324
StateContext: schema.ImportStatePassthroughContext,
2425
},

website/docs/r/monitor_alert_downtime.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ description: |-
1010

1111
Creates a Sysdig Monitor Downtime Alert. Monitor any type of entity - host, container, process, service, etc - and alert when the entity goes down.
1212

13+
~> **Deprecation Notice:** `sysdig_monitor_alert_downtime` has been deprecated and will be removed in future releases, use `sysdig_monitor_alert_v2_downtime` instead.
14+
1315
-> **Note:** Sysdig Terraform Provider is under rapid development at this point. If you experience any issue or discrepancy while using it, please make sure you have the latest version. If the issue persists, or you have a Feature Request to support an additional set of resources, please open a [new issue](https://github.com/sysdiglabs/terraform-provider-sysdig/issues/new) in the GitHub repository.
1416

1517
## Example Usage

website/docs/r/monitor_alert_event.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Creates a Sysdig Monitor Event Alert. Monitor occurrences of specific events, an
1212
number of occurrences violates a threshold. Useful for alerting on container, orchestration, and
1313
service events like restarts and deployments.
1414

15+
~> **Deprecation Notice:** `sysdig_monitor_alert_event` has been deprecated and will be removed in future releases, use `sysdig_monitor_alert_v2_event` instead.
16+
1517
-> **Note:** Sysdig Terraform Provider is under rapid development at this point. If you experience any issue or discrepancy while using it, please make sure you have the latest version. If the issue persists, or you have a Feature Request to support an additional set of resources, please open a [new issue](https://github.com/sysdiglabs/terraform-provider-sysdig/issues/new) in the GitHub repository.
1618

1719
## Example Usage

website/docs/r/monitor_alert_metric.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ description: |-
1010

1111
Creates a Sysdig Monitor Metric Threshold Alert. Monitor time-series metrics and alert if they violate user-defined thresholds.
1212

13+
~> **Deprecation Notice:** `sysdig_monitor_alert_metric` has been deprecated and will be removed in future releases, use `sysdig_monitor_alert_v2_metric` instead.
14+
1315
-> **Note:** Sysdig Terraform Provider is under rapid development at this point. If you experience any issue or discrepancy while using it, please make sure you have the latest version. If the issue persists, or you have a Feature Request to support an additional set of resources, please open a [new issue](https://github.com/sysdiglabs/terraform-provider-sysdig/issues/new) in the GitHub repository.
1416

1517
## Example Usage

website/docs/r/monitor_alert_promql.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ description: |-
1010

1111
Creates a Sysdig Monitor Prometheus Alert. Monitor prometheus metrics and alert if they violate user-defined PromQL-based metric expression.
1212

13+
~> **Deprecation Notice:** `sysdig_monitor_alert_promql` has been deprecated and will be removed in future releases, use `sysdig_monitor_alert_v2_prometheus` instead.
14+
1315
-> **Note:** Sysdig Terraform Provider is under rapid development at this point. If you experience any issue or discrepancy while using it, please make sure you have the latest version. If the issue persists, or you have a Feature Request to support an additional set of resources, please open a [new issue](https://github.com/sysdiglabs/terraform-provider-sysdig/issues/new) in the GitHub repository.
1416

1517
## Example Usage

0 commit comments

Comments
 (0)