4

I'm writing a terraform template to setup escalation policies.

https://www.terraform.io/docs/providers/pagerduty/r/escalation_policy.html

I want to create an escalation policy to a specific user, but I don't know whether to specify user or user_reference as a value of rule.target.type. What's the difference between user and user_reference in PagerDuty API?

Yusuke NOJIMA
  • 255
  • 1
  • 7

1 Answers1

3

As a value of rule.target.type, user and user_reference are one and the same. Using either type should create an escalation policy that involves the specified user that is defined with rule.target.id.

stmcallister
  • 1,682
  • 1
  • 12
  • 21
  • Thank you! Then, I'll use `user_reference` because PagerDuty API returns the target as `user_reference` even if the target was defined as `user`. – Yusuke NOJIMA Oct 04 '19 at 01:07