From c0b86e1ca251ba7e7c661b9313b7654aee778389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Antonio=20Reyes?= Date: Thu, 18 Jan 2024 17:24:50 -0300 Subject: [PATCH] little tweaks here and there fix typo in test. update `pagerduty_service` docs`. patch `pagerduty_service` format failing tests. --- pagerduty/resource_pagerduty_service_test.go | 5 +++-- website/docs/r/service.html.markdown | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pagerduty/resource_pagerduty_service_test.go b/pagerduty/resource_pagerduty_service_test.go index 4adbff08e..03aa75be0 100644 --- a/pagerduty/resource_pagerduty_service_test.go +++ b/pagerduty/resource_pagerduty_service_test.go @@ -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, @@ -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, }, }, }) diff --git a/website/docs/r/service.html.markdown b/website/docs/r/service.html.markdown index a09323478..ef43fa469 100644 --- a/website/docs/r/service.html.markdown +++ b/website/docs/r/service.html.markdown @@ -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: