Skip to content

Commit 34e3302

Browse files
committed
Allow deleting alert_grouping_parameters with a time_window equal to 86400
1 parent 64dee57 commit 34e3302

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pagerduty/resource_pagerduty_service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ func customizePagerDutyServiceDiff(context context.Context, diff *schema.Resourc
352352
if agpType == "content_based" && (aggregateVal == "" || len(fieldsVal) == 0) {
353353
return fmt.Errorf("When using Alert grouping parameters configuration of type \"content_based\" is in use, attributes \"aggregate\" and \"fields\" are required")
354354
}
355-
if timeWindowVal == 86400 && agpType != "content_based" {
355+
if timeWindowVal == 86400 && agpType != "" && agpType != "content_based" {
356356
return fmt.Errorf("Alert grouping parameters configuration attribute \"time_window\" with a value of 86400 is only supported by \"content-based\" type Alert Grouping")
357357
}
358358
if (aggregateVal != "" || len(fieldsVal) > 0) && (agpType != "" && hasChangeAgpType && agpType != "content_based") {

0 commit comments

Comments
 (0)