github.com/ves/terraform@v0.8.0-beta2/website/source/docs/providers/pagerduty/r/service.html.markdown (about) 1 --- 2 layout: "pagerduty" 3 page_title: "PagerDuty: pagerduty_service" 4 sidebar_current: "docs-pagerduty-resource-service" 5 description: |- 6 Creates and manages a service in PagerDuty. 7 --- 8 9 # pagerduty\_service 10 11 A [service](https://v2.developer.pagerduty.com/v2/page/api-reference#!/Services/get_services) represents something you monitor (like a web service, email service, or database service). It is a container for related incidents that associates them with escalation policies. 12 13 14 ## Example Usage 15 16 ``` 17 resource "pagerduty_user" "example" { 18 name = "Earline Greenholt" 19 email = "125.greenholt.earline@graham.name" 20 teams = ["${pagerduty_team.example.id}"] 21 } 22 23 resource "pagerduty_escalation_policy" "foo" { 24 name = "Engineering Escalation Policy" 25 num_loops = 2 26 27 rule { 28 escalation_delay_in_minutes = 10 29 30 target { 31 type = "user" 32 id = "${pagerduty_user.example.id}" 33 } 34 } 35 } 36 37 resource "pagerduty_service" "example" { 38 name = "My Web App" 39 auto_resolve_timeout = 14400 40 acknowledgement_timeout = 600 41 escalation_policy = "${pagerduty_escalation_policy.example.id}" 42 } 43 ``` 44 45 ## Argument Reference 46 47 The following arguments are supported: 48 49 * `name` - (Required) The name of the service. 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 * `auto_resolve_timeout` - (Optional) Time in seconds that an incident is automatically resolved if left open for that long. 53 * `acknowledgement_timeout` - (Optional) Time in seconds that an incident changes to the Triggered State after being Acknowledged. 54 * `escalation_policy` - (Required) The escalation policy used by this service. 55 56 ## Attributes Reference 57 58 The following attributes are exported: 59 60 * `id` - The ID of the service. 61 62 ## Import 63 64 Services can be imported using the `id`, e.g. 65 66 ``` 67 $ terraform import pagerduty_service.main PLBP09X 68 ```