Skip to content

Commit

Permalink
Actually mark alert_grouping and alert_grouping_timeout deprecate…
Browse files Browse the repository at this point in the history
…d and mark them conflicting with `alert_grouping_parameters` that takes precedence over them
  • Loading branch information
pdecat committed Aug 20, 2021
1 parent 5a223b9 commit 150448d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
19 changes: 12 additions & 7 deletions pagerduty/resource_pagerduty_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,22 @@ func resourcePagerDutyService() *schema.Resource {
"intelligent",
"rules",
}),
Deprecated: "Use `alert_grouping_parameters.type`",
ConflictsWith: []string{"alert_grouping_parameters"},
},
"alert_grouping_timeout": {
Type: schema.TypeString,
Optional: true,
Computed: true,
Type: schema.TypeString,
Optional: true,
Computed: true,
Deprecated: "Use `alert_grouping_parameters.config.timeout`",
ConflictsWith: []string{"alert_grouping_parameters"},
},
"alert_grouping_parameters": {
Type: schema.TypeList,
Computed: true,
Optional: true,
MaxItems: 1,
Type: schema.TypeList,
Computed: true,
Optional: true,
MaxItems: 1,
ConflictsWith: []string{"alert_grouping", "alert_grouping_timeout"},
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"type": {
Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/service.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ The following arguments are supported:
* `acknowledgement_timeout` - (Optional) Time in seconds that an incident changes to the Triggered State after being Acknowledged. Disabled if set to the `"null"` string.
* `escalation_policy` - (Required) The escalation policy used by this service.
* `alert_creation` - (Optional) Must be one of two values. PagerDuty receives events from your monitoring systems and can then create incidents in different ways. Value "create_incidents" is default: events will create an incident that cannot be merged. Value "create_alerts_and_incidents" is the alternative: events will create an alert and then add it to a new incident, these incidents can be merged. This option is recommended.
* `alert_grouping` - (Optional) (Deprecated) Defines how alerts on this service will be automatically grouped into incidents. Note that the alert grouping features are available only on certain plans. If not set, each alert will create a separate incident; If value is set to `time`: All alerts within a specified duration will be grouped into the same incident. This duration is set in the `alert_grouping_timeout` setting (described below). Available on Standard, Enterprise, and Event Intelligence plans; If value is set to `intelligent` - Alerts will be intelligently grouped based on a machine learning model that looks at the alert summary, timing, and the history of grouped alerts. Available on Enterprise and Event Intelligence plan.
* `alert_grouping_timeout` - (Optional) (Deprecated) The duration in minutes within which to automatically group incoming alerts. This setting applies only when `alert_grouping` is set to `time`. To continue grouping alerts until the incident is resolved, set this value to `0`.
* `alert_grouping` - (Optional) (Deprecated) Defines how alerts on this service will be automatically grouped into incidents. Note that the alert grouping features are available only on certain plans. If not set, each alert will create a separate incident; If value is set to `time`: All alerts within a specified duration will be grouped into the same incident. This duration is set in the `alert_grouping_timeout` setting (described below). Available on Standard, Enterprise, and Event Intelligence plans; If value is set to `intelligent` - Alerts will be intelligently grouped based on a machine learning model that looks at the alert summary, timing, and the history of grouped alerts. Available on Enterprise and Event Intelligence plan. This field is deprecated, use `alert_grouping_parameters.type` instead,
* `alert_grouping_timeout` - (Optional) (Deprecated) The duration in minutes within which to automatically group incoming alerts. This setting applies only when `alert_grouping` is set to `time`. To continue grouping alerts until the incident is resolved, set this value to `0`. This field is deprecated, use `alert_grouping_parameters.config.timeout` instead,
* `alert_grouping_parameters` - (Optional) Defines how alerts on this service will be automatically grouped into incidents. Note that the alert grouping features are available only on certain plans. If not set, each alert will create a separate incident.

The `alert_grouping_parameters` block contains the following arguments:
Expand Down

0 comments on commit 150448d

Please sign in to comment.