Skip to content

Commit 8fd2d4d

Browse files
authored
feat(monitor): deprecate not supported resources (#220)
1 parent 9813367 commit 8fd2d4d

File tree

4 files changed

+16
-10
lines changed

4 files changed

+16
-10
lines changed

sysdig/resource_sysdig_monitor_alert_anomaly.go

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

1717
return &schema.Resource{
18-
CreateContext: resourceSysdigAlertAnomalyCreate,
19-
UpdateContext: resourceSysdigAlertAnomalyUpdate,
20-
ReadContext: resourceSysdigAlertAnomalyRead,
21-
DeleteContext: resourceSysdigAlertAnomalyDelete,
18+
DeprecationMessage: "Anomaly Detection Alerts have been deprecated, \"sysdig_monitor_alert_anomaly\" will be removed in future releases",
19+
CreateContext: resourceSysdigAlertAnomalyCreate,
20+
UpdateContext: resourceSysdigAlertAnomalyUpdate,
21+
ReadContext: resourceSysdigAlertAnomalyRead,
22+
DeleteContext: resourceSysdigAlertAnomalyDelete,
2223
Importer: &schema.ResourceImporter{
2324
StateContext: schema.ImportStatePassthroughContext,
2425
},

sysdig/resource_sysdig_monitor_alert_group_outlier.go

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

1717
return &schema.Resource{
18-
CreateContext: resourceSysdigAlertGroupOutlierCreate,
19-
UpdateContext: resourceSysdigAlertGroupOutlierUpdate,
20-
ReadContext: resourceSysdigAlertGroupOutlierRead,
21-
DeleteContext: resourceSysdigAlertGroupOutlierDelete,
18+
DeprecationMessage: "Group Outlier Alerts have been deprecated, \"sysdig_monitor_alert_group_outlier\" will be removed in future releases",
19+
CreateContext: resourceSysdigAlertGroupOutlierCreate,
20+
UpdateContext: resourceSysdigAlertGroupOutlierUpdate,
21+
ReadContext: resourceSysdigAlertGroupOutlierRead,
22+
DeleteContext: resourceSysdigAlertGroupOutlierDelete,
2223
Importer: &schema.ResourceImporter{
2324
StateContext: schema.ImportStatePassthroughContext,
2425
},

website/docs/r/monitor_alert_anomaly.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ description: |-
1010

1111
Creates a Sysdig Monitor Anomaly Alert. Monitor hosts based on their historical behaviors and alert when they deviate.
1212

13+
~> **Deprecation Notice:** Anomaly Detection Alerts have been deprecated in Sysdig Monitor, `sysdig_monitor_alert_anomaly` will be removed in future releases, consider rewriting the resource as a promql alert.
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
@@ -91,4 +93,4 @@ Anomaly Monitor alerts can be imported using the alert ID, e.g.
9193

9294
```
9395
$ terraform import sysdig_monitor_alert_anomaly.example 12345
94-
```
96+
```

website/docs/r/monitor_alert_group_outlier.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ description: |-
1010

1111
Creates a Sysdig Monitor Group Outlier Alert. Monitor a group of hosts and be notified when one acts differently from the rest.
1212

13+
~> **Deprecation Notice:** Group Outlier Alerts have been deprecated in Sysdig Monitor, `sysdig_monitor_alert_group_outlier` will be removed in future releases, consider rewriting the resource as a promql alert.
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
@@ -91,4 +93,4 @@ Group Outlier Monitor alerts can be imported using the alert ID, e.g.
9193

9294
```
9395
$ terraform import sysdig_monitor_alert_group_outlier.example 12345
94-
```
96+
```

0 commit comments

Comments
 (0)