Skip to content

Commit

Permalink
Fix `panic: alert_grouping_timeout: '' expected type 'string', got un…
Browse files Browse the repository at this point in the history
…convertible type 'int'`:

```
panic: alert_grouping_timeout: '' expected type 'string', got unconvertible type 'int'

goroutine 288 [running]:
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ResourceData).Set(0xc000188900, {0x1065e32, 0x16}, {0xec9ec0, 0xc0006aa8e8})
        /home/patrick/go/src/github.com/PagerDuty/terraform-provider-pagerduty/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_data.go:230 +0x2a5
github.com/terraform-providers/terraform-provider-pagerduty/pagerduty.resourcePagerDutyServiceRead.func1()
        /home/patrick/go/src/github.com/PagerDuty/terraform-provider-pagerduty/pagerduty/resource_pagerduty_service.go:396 +0x508
github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource.RetryContext.func1()
        /home/patrick/go/src/github.com/PagerDuty/terraform-provider-pagerduty/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource/wait.go:27 +0x56
github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource.(*StateChangeConf).WaitForStateContext.func1()
        /home/patrick/go/src/github.com/PagerDuty/terraform-provider-pagerduty/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource/state.go:110 +0x21f
created by github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource.(*StateChangeConf).WaitForStateContext
        /home/patrick/go/src/github.com/PagerDuty/terraform-provider-pagerduty/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource/state.go:83 +0x1dd
FAIL    github.com/terraform-providers/terraform-provider-pagerduty/pagerduty   5.947s
FAIL
make: *** [GNUmakefile:17: testacc] Error 1
```
  • Loading branch information
pdecat committed Aug 20, 2021
1 parent f88cd19 commit bd435aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pagerduty/resource_pagerduty_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ func resourcePagerDutyServiceRead(d *schema.ResourceData, meta interface{}) erro
if service.AlertGroupingTimeout == nil {
d.Set("alert_grouping_timeout", "null")
} else {
d.Set("alert_grouping_timeout", *service.AlertGroupingTimeout)
d.Set("alert_grouping_timeout", strconv.Itoa(*service.AlertGroupingTimeout))
}
if service.AlertGroupingParameters != nil {
if err := d.Set("alert_grouping_parameters", flattenAlertGroupingParameters(service.AlertGroupingParameters)); err != nil {
Expand Down

0 comments on commit bd435aa

Please sign in to comment.