diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bb777f0c..506acc0ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ BUG FIXES: +* resource/resource_pagerduty_service: Fix service to populate the `alert_grouping` and `alert_grouping_timeout` fields when reading resource * resource/resource_pagerduty_event_rule: Changing pagerduty_event_rule.catch_all field to Computed [GH-169] * data-source/pagerduty_vendor: Fix the exact matching of vendor name when it contains special chars [GH-166] diff --git a/pagerduty/resource_pagerduty_service.go b/pagerduty/resource_pagerduty_service.go index e63580701..5d8b23d26 100644 --- a/pagerduty/resource_pagerduty_service.go +++ b/pagerduty/resource_pagerduty_service.go @@ -317,6 +317,14 @@ func resourcePagerDutyServiceRead(d *schema.ResourceData, meta interface{}) erro d.Set("acknowledgement_timeout", strconv.Itoa(*service.AcknowledgementTimeout)) } d.Set("alert_creation", service.AlertCreation) + if service.AlertGrouping != "" { + d.Set("alert_grouping", service.AlertGrouping) + } + if service.AlertGroupingTimeout == nil { + d.Set("alert_grouping_timeout", "null") + } else { + d.Set("alert_grouping_timeout", *service.AlertGroupingTimeout) + } if service.IncidentUrgencyRule != nil { if err := d.Set("incident_urgency_rule", flattenIncidentUrgencyRule(service.IncidentUrgencyRule)); err != nil {