Skip to content

Commit

Permalink
feat(monitor): deprecate not supported resources (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbonf authored Dec 15, 2022
1 parent 9813367 commit 8fd2d4d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
9 changes: 5 additions & 4 deletions sysdig/resource_sysdig_monitor_alert_anomaly.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ func resourceSysdigMonitorAlertAnomaly() *schema.Resource {
timeout := 5 * time.Minute

return &schema.Resource{
CreateContext: resourceSysdigAlertAnomalyCreate,
UpdateContext: resourceSysdigAlertAnomalyUpdate,
ReadContext: resourceSysdigAlertAnomalyRead,
DeleteContext: resourceSysdigAlertAnomalyDelete,
DeprecationMessage: "Anomaly Detection Alerts have been deprecated, \"sysdig_monitor_alert_anomaly\" will be removed in future releases",
CreateContext: resourceSysdigAlertAnomalyCreate,
UpdateContext: resourceSysdigAlertAnomalyUpdate,
ReadContext: resourceSysdigAlertAnomalyRead,
DeleteContext: resourceSysdigAlertAnomalyDelete,
Importer: &schema.ResourceImporter{
StateContext: schema.ImportStatePassthroughContext,
},
Expand Down
9 changes: 5 additions & 4 deletions sysdig/resource_sysdig_monitor_alert_group_outlier.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ func resourceSysdigMonitorAlertGroupOutlier() *schema.Resource {
timeout := 5 * time.Minute

return &schema.Resource{
CreateContext: resourceSysdigAlertGroupOutlierCreate,
UpdateContext: resourceSysdigAlertGroupOutlierUpdate,
ReadContext: resourceSysdigAlertGroupOutlierRead,
DeleteContext: resourceSysdigAlertGroupOutlierDelete,
DeprecationMessage: "Group Outlier Alerts have been deprecated, \"sysdig_monitor_alert_group_outlier\" will be removed in future releases",
CreateContext: resourceSysdigAlertGroupOutlierCreate,
UpdateContext: resourceSysdigAlertGroupOutlierUpdate,
ReadContext: resourceSysdigAlertGroupOutlierRead,
DeleteContext: resourceSysdigAlertGroupOutlierDelete,
Importer: &schema.ResourceImporter{
StateContext: schema.ImportStatePassthroughContext,
},
Expand Down
4 changes: 3 additions & 1 deletion website/docs/r/monitor_alert_anomaly.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: |-

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

~> **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.

-> **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.

## Example Usage
Expand Down Expand Up @@ -91,4 +93,4 @@ Anomaly Monitor alerts can be imported using the alert ID, e.g.

```
$ terraform import sysdig_monitor_alert_anomaly.example 12345
```
```
4 changes: 3 additions & 1 deletion website/docs/r/monitor_alert_group_outlier.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: |-

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

~> **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.

-> **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.

## Example Usage
Expand Down Expand Up @@ -91,4 +93,4 @@ Group Outlier Monitor alerts can be imported using the alert ID, e.g.

```
$ terraform import sysdig_monitor_alert_group_outlier.example 12345
```
```

0 comments on commit 8fd2d4d

Please sign in to comment.