github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/website/source/docs/providers/pagerduty/r/escalation_policy.html.markdown (about) 1 --- 2 layout: "pagerduty" 3 page_title: "PagerDuty: pagerduty_escalation_policy" 4 sidebar_current: "docs-pagerduty-resource-escalation_policy" 5 description: |- 6 Creates and manages an escalation policy in PagerDuty. 7 --- 8 9 # pagerduty\_escalation_policy 10 11 An [escalation policy](https://v2.developer.pagerduty.com/v2/page/api-reference#!/Escalation_Policies/get_escalation_policies) determines what user or schedule will be notified first, second, and so on when an incident is triggered. Escalation policies are used by one or more services. 12 13 14 ## Example Usage 15 16 ``` 17 resource "pagerduty_team" "example" { 18 name = "Engineering" 19 description = "All engineering" 20 } 21 22 resource "pagerduty_user" "example" { 23 name = "Earline Greenholt" 24 email = "125.greenholt.earline@graham.name" 25 teams = ["${pagerduty_team.example.id}"] 26 } 27 28 resource "pagerduty_escalation_policy" "example" { 29 name = "Engineering Escalation Policy" 30 num_loops = 2 31 teams = ["${pagerduty_team.example.id}"] 32 33 rule { 34 escalation_delay_in_minutes = 10 35 36 target { 37 type = "user" 38 id = "${pagerduty_user.example.id}" 39 } 40 } 41 } 42 ``` 43 44 ## Argument Reference 45 46 The following arguments are supported: 47 48 * `name` - (Required) The name of the escalation policy. 49 * `teams` - (Optional) Teams associated with the policy. Account must have the `teams` ability to use this parameter. 50 * `description` - (Optional) A human-friendly description of the escalation policy. 51 If not set, a placeholder of "Managed by Terraform" will be set. 52 * `num_loops` - (Optional) The number of times the escalation policy will repeat after reaching the end of its escalation. 53 * `rule` - (Required) An Escalation rule block. Escalation rules documented below. 54 55 56 Escalation rules (`rule`) supports the following: 57 58 * `escalation_delay_in_minutes` - (Required) The number of minutes before an unacknowledged incident escalates away from this rule. 59 * `targets` - (Required) A target block. Target blocks documented below. 60 61 62 Targets (`target`) supports the following: 63 64 * `type` - (Optional) Can be `user`, `schedule`, `user_reference` or `schedule_reference`. Defaults to `user_reference` 65 * `id` - (Required) A target ID 66 67 ## Attributes Reference 68 69 The following attributes are exported: 70 71 * `id` - The ID of the escalation policy. 72 73 ## Import 74 75 Escalation policies can be imported using the `id`, e.g. 76 77 ``` 78 $ terraform import pagerduty_escalation_policy.main PLBP09X 79 ```