github.com/pbthorste/terraform@v0.8.6-0.20170127005045-deb56bd93da2/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 ``` 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 data "pagerduty_vendor" "cloudwatch" { 54 name_regex = "Amazon CloudWatch" 55 } 56 57 resource "pagerduty_service_integration" "datadog" { 58 name = "${data.pagerduty_vendor.datadog.name}" 59 type = "generic_events_api_inbound_integration" 60 service = "${pagerduty_service.example.id}" 61 vendor = "${data.pagerduty_vendor.datadog.id}" 62 } 63 64 resource "pagerduty_service_integration" "datadog" { 65 name = "${data.pagerduty_vendor.datadog.name}" 66 type = "generic_events_api_inbound_integration" 67 service = "${pagerduty_service.example.id}" 68 vendor = "${data.pagerduty_vendor.datadog.id}" 69 } 70 ``` 71 72 ## Argument Reference 73 74 The following arguments are supported: 75 76 * `name` - (Optional) The name of the service integration. 77 * `type` - (Optional) The service type. Can be `aws_cloudwatch_inbound_integration`, `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`, 84 `sql_monitor_inbound_integration`. 85 86 When integrating with a `vendor` this can usually be set to: `${data.pagerduty_vendor.datadog.type}` 87 88 * `service` - (Optional) The PagerDuty service that the integration belongs to. 89 * `vendor` - (Optional) The vendor that this integration integrates with, if applicable. (e.g Datadog) 90 91 ## Attributes Reference 92 93 The following attributes are exported: 94 95 * `id` - The ID of the service integration. 96 * `integration_key` - This is the unique key used to route events to this integration when received via the PagerDuty Events API. 97 * `integration_email` - This is the unique fully-qualified email address used for routing emails to this integration for processing.