github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/website/source/docs/providers/pagerduty/r/service_integration.html.markdown (about) 1 --- 2 layout: "pagerduty" 3 page_title: "PagerDuty: pagerduty_service_integration" 4 sidebar_current: "docs-pagerduty-resource-service-integration" 5 description: |- 6 Creates and manages a service integration in PagerDuty. 7 --- 8 9 # pagerduty\_service_integration 10 11 A [service integration](https://v2.developer.pagerduty.com/v2/page/api-reference#!/Services/post_services_id_integrations) is an integration that belongs to a service. 12 13 ## Example Usage 14 15 ```hcl 16 resource "pagerduty_user" "example" { 17 name = "Earline Greenholt" 18 email = "125.greenholt.earline@graham.name" 19 teams = ["${pagerduty_team.example.id}"] 20 } 21 22 resource "pagerduty_escalation_policy" "foo" { 23 name = "Engineering Escalation Policy" 24 num_loops = 2 25 26 rule { 27 escalation_delay_in_minutes = 10 28 29 target { 30 type = "user" 31 id = "${pagerduty_user.example.id}" 32 } 33 } 34 } 35 36 resource "pagerduty_service" "example" { 37 name = "My Web App" 38 auto_resolve_timeout = 14400 39 acknowledgement_timeout = 600 40 escalation_policy = "${pagerduty_escalation_policy.example.id}" 41 } 42 43 resource "pagerduty_service_integration" "example" { 44 name = "Generic API Service Integration" 45 type = "generic_events_api_inbound_integration" 46 service = "${pagerduty_service.example.id}" 47 } 48 49 data "pagerduty_vendor" "datadog" { 50 name = "Datadog" 51 } 52 53 resource "pagerduty_service_integration" "datadog" { 54 name = "${data.pagerduty_vendor.datadog.name}" 55 service = "${pagerduty_service.example.id}" 56 vendor = "${data.pagerduty_vendor.datadog.id}" 57 } 58 59 data "pagerduty_vendor" "cloudwatch" { 60 name = "Cloudwatch" 61 } 62 63 resource "pagerduty_service_integration" "cloudwatch" { 64 name = "${data.pagerduty_vendor.cloudwatch.name}" 65 service = "${pagerduty_service.example.id}" 66 vendor = "${data.pagerduty_vendor.cloudwatch.id}" 67 } 68 ``` 69 70 ## Argument Reference 71 72 The following arguments are supported: 73 74 * `name` - (Optional) The name of the service integration. 75 * `type` - (Optional) The service type. Can be: 76 `aws_cloudwatch_inbound_integration`, 77 `cloudkick_inbound_integration`, 78 `event_transformer_api_inbound_integration`, 79 `generic_email_inbound_integration`, 80 `generic_events_api_inbound_integration`, 81 `keynote_inbound_integration`, 82 `nagios_inbound_integration`, 83 `pingdom_inbound_integration`or `sql_monitor_inbound_integration`. 84 85 **Note:** This is meant for **generic** service integrations. 86 To integrate with a **vendor** (e.g Datadog or Amazon Cloudwatch) use the `vendor` field instead. 87 88 * `service` - (Optional) The ID of the service the integration should belong to. 89 * `vendor` - (Optional) The ID of the vendor the integration should integrate with (e.g Datadog or Amazon Cloudwatch). 90 91 **Note:** You can use the `pagerduty_vendor` data source to locate the appropriate vendor ID. 92 ## Attributes Reference 93 94 The following attributes are exported: 95 96 * `id` - The ID of the service integration. 97 * `integration_key` - This is the unique key used to route events to this integration when received via the PagerDuty Events API. 98 * `integration_email` - This is the unique fully-qualified email address used for routing emails to this integration for processing.