Skip to content

Commit

Permalink
little tweaks here and there
Browse files Browse the repository at this point in the history
fix typo in test.
update `pagerduty_service` docs`.
patch `pagerduty_service` format failing tests.
  • Loading branch information
imjaroiswebdev committed Jan 18, 2024
1 parent 23c3672 commit c0b86e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions pagerduty/resource_pagerduty_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ func TestAccPagerDutyService_FormatValidation(t *testing.T) {
`,
),
PlanOnly: true,
ExpectError: regexp.MustCompile("Alert grouping parameters configuration attribute \"time_window\" is only supported by \"intelligent\" and \"content_based\" type Alert Grouping"),
ExpectError: regexp.MustCompile("Alert grouping parameters configuration attribute \"time_window\" is only supported by \"intelligent\" and \"content-based\" type Alert Grouping"),
},
{
Config: testAccCheckPagerDutyServiceAlertGroupingInputValidationConfig(username, email, escalationPolicy, service,
Expand Down Expand Up @@ -312,12 +312,13 @@ func TestAccPagerDutyService_FormatValidation(t *testing.T) {
alert_grouping_parameters {
type = "content_based"
config {
aggregate = "all"
fields = ["custom_details.source_id"]
time_window = 300
}
}
`,
),
PlanOnly: true,
},
},
})
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/service.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ The `alert_grouping_parameters` block contains the following arguments:
* `timeout` - (Optional) The duration in minutes within which to automatically group incoming alerts. This setting applies only when `type` is set to `time`. To continue grouping alerts until the incident is resolved, set this value to `0`.
* `aggregate` - (Optional) One of `any` or `all`. This setting applies only when `type` is set to `content_based`. Group alerts based on one or all of `fields` value(s).
* `fields` - (Optional) Alerts will be grouped together if the content of these fields match. This setting applies only when `type` is set to `content_based`.
* `time_window` - (Optional) The maximum amount of time allowed between Alerts. Value must be between `300` and `3600`. Any Alerts arriving greater than `time_window` seconds apart will not be grouped together. This is a rolling time window and is counted from the most recently grouped alert. The window is extended every time a new alert is added to the group, up to 24 hours.
* `time_window` - (Optional) The maximum amount of time allowed between Alerts. This setting applies only when `type` is set to `intelligent` or `content_based`. Value must be between `300` and `3600`. Any Alerts arriving greater than `time_window` seconds apart will not be grouped together. This is a rolling time window and is counted from the most recently grouped alert. The window is extended every time a new alert is added to the group, up to 24 hours.

The `auto_pause_notifications_parameters` block contains the following arguments:

Expand Down

0 comments on commit c0b86e1

Please sign in to comment.