github.com/ves/terraform@v0.8.0-beta2/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  `Note`: A service integration `cannot` be deleted via Terraform nor the PagerDuty API so if you remove a service integration, be sure to remove it from the PagerDuty Web UI afterwards. However, if you delete the `service` attached to the `integration`, the integration will be removed.
    14  
    15  
    16  ## Example Usage
    17  
    18  ```
    19  resource "pagerduty_user" "example" {
    20      name  = "Earline Greenholt"
    21      email = "125.greenholt.earline@graham.name"
    22      teams = ["${pagerduty_team.example.id}"]
    23  }
    24  
    25  resource "pagerduty_escalation_policy" "foo" {
    26    name      = "Engineering Escalation Policy"
    27    num_loops = 2
    28  
    29    rule {
    30      escalation_delay_in_minutes = 10
    31  
    32      target {
    33        type = "user"
    34        id   = "${pagerduty_user.example.id}"
    35      }
    36    }
    37  }
    38  
    39  resource "pagerduty_service" "example" {
    40    name                    = "My Web App"
    41    auto_resolve_timeout    = 14400
    42    acknowledgement_timeout = 600
    43    escalation_policy       = "${pagerduty_escalation_policy.example.id}"
    44  }
    45  
    46  resource "pagerduty_service_integration" "example" {
    47    name    = "Generic API Service Integration"
    48    type    = "generic_events_api_inbound_integration"
    49    service = "${pagerduty_service.example.id}"
    50  }
    51  
    52  data "pagerduty_vendor" "datadog" {
    53    name = "Datadog"
    54  }
    55  
    56  data "pagerduty_vendor" "cloudwatch" {
    57    name_regex = "Amazon CloudWatch"
    58  }
    59  
    60  resource "pagerduty_service_integration" "datadog" {
    61    name    = "${data.pagerduty_vendor.datadog.name}"
    62    type    = "generic_events_api_inbound_integration"
    63    service = "${pagerduty_service.example.id}"
    64    vendor  = "${data.pagerduty_vendor.datadog.id}"
    65  }
    66  
    67  resource "pagerduty_service_integration" "datadog" {
    68    name    = "${data.pagerduty_vendor.datadog.name}"
    69    type    = "generic_events_api_inbound_integration"
    70    service = "${pagerduty_service.example.id}"
    71    vendor  = "${data.pagerduty_vendor.datadog.id}"
    72  }
    73  ```
    74  
    75  ## Argument Reference
    76  
    77  The following arguments are supported:
    78  
    79    * `name` - (Optional) The name of the service integration.
    80    * `type` - (Optional) The service type. Can be `aws_cloudwatch_inbound_integration`, `cloudkick_inbound_integration`,
    81    `event_transformer_api_inbound_integration`,
    82    `generic_email_inbound_integration`,
    83    `generic_events_api_inbound_integration`,
    84    `keynote_inbound_integration`,
    85    `nagios_inbound_integration`,
    86    `pingdom_inbound_integration`,
    87    `sql_monitor_inbound_integration`.
    88  
    89      When integrating with a `vendor` this can usually be set to: `${data.pagerduty_vendor.datadog.type}`
    90  
    91    * `service` - (Optional) The PagerDuty service that the integration belongs to.
    92    * `vendor` - (Optional) The vendor that this integration integrates with, if applicable. (e.g Datadog)
    93  
    94  ## Attributes Reference
    95  
    96  The following attributes are exported:
    97  
    98    * `id` - The ID of the service integration.
    99    * `integration_key` - This is the unique key used to route events to this integration when received via the PagerDuty Events API.
   100    * `integration_email` - This is the unique fully-qualified email address used for routing emails to this integration for processing.