diff --git a/builtin/providers/pagerduty/resource_pagerduty_service.go b/builtin/providers/pagerduty/resource_pagerduty_service.go index d45710306..aa20cf408 100644 --- a/builtin/providers/pagerduty/resource_pagerduty_service.go +++ b/builtin/providers/pagerduty/resource_pagerduty_service.go @@ -61,9 +61,13 @@ func buildServiceStruct(d *schema.ResourceData) *pagerduty.Service { service.AcknowledgementTimeout = &acknowledgementTimeout } - policy := &pagerduty.EscalationPolicy{} - policy.ID = d.Get("escalation_policy").(string) - policy.Type = "escalation_policy" + policy := &pagerduty.EscalationPolicy{ + APIObject: pagerduty.APIObject{ + ID: d.Get("escalation_policy").(string), + Type: "escalation_policy", + }, + } + service.EscalationPolicy = *policy return &service