Simplify setting up EscalationPolicy
This commit is contained in:
parent
69fb733ad0
commit
35312f0066
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue