Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes Bug On alert_grouping field when Importing Services #177

Merged
merged 7 commits into from
Jan 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
8 changes: 8 additions & 0 deletions pagerduty/resource_pagerduty_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down