|
| 1 | +--- |
| 2 | +# generated by https://github.com/hashicorp/terraform-plugin-docs |
| 3 | +page_title: "sentry_integration_pagerduty Resource - terraform-provider-sentry" |
| 4 | +subcategory: "" |
| 5 | +description: |- |
| 6 | + Manage a PagerDuty service integration. |
| 7 | +--- |
| 8 | + |
| 9 | +# sentry_integration_pagerduty (Resource) |
| 10 | + |
| 11 | +Manage a PagerDuty service integration. |
| 12 | + |
| 13 | +## Example Usage |
| 14 | + |
| 15 | +```terraform |
| 16 | +# Retrieve the PagerDuty organization integration |
| 17 | +data "sentry_organization_integration" "pagerduty" { |
| 18 | + organization = local.organization |
| 19 | +
|
| 20 | + provider_key = "pagerduty" |
| 21 | + name = "my-pagerduty-organization" |
| 22 | +} |
| 23 | +
|
| 24 | +# Associate a PagerDuty service and integration key with a Sentry PagerDuty integration |
| 25 | +resource "sentry_integration_pagerduty" "test" { |
| 26 | + organization = local.organization |
| 27 | + integration_id = data.sentry_organization_integration.pagerduty.id |
| 28 | +
|
| 29 | + service_name = "my-pagerduty-service" |
| 30 | + integration_key = "my-pagerduty-integration-key" |
| 31 | +} |
| 32 | +``` |
| 33 | + |
| 34 | +<!-- schema generated by tfplugindocs --> |
| 35 | +## Schema |
| 36 | + |
| 37 | +### Required |
| 38 | + |
| 39 | +- `integration_id` (String) The ID of the PagerDuty integration. Source from the URL `https://<organization>.sentry.io/settings/integrations/pagerduty/<integration-id>/` or use the `sentry_organization_integration` data source. |
| 40 | +- `integration_key` (String) The integration key of the PagerDuty service. |
| 41 | +- `organization` (String) The slug of the organization the resource belongs to. |
| 42 | +- `service_name` (String) The name of the PagerDuty service. |
| 43 | + |
| 44 | +### Read-Only |
| 45 | + |
| 46 | +- `id` (String) The ID of this resource. |
| 47 | + |
| 48 | +## Import |
| 49 | + |
| 50 | +Import is supported using the following syntax: |
| 51 | + |
| 52 | +```shell |
| 53 | +# import using the organization slug from the URL: |
| 54 | +# https://sentry.io/api/0/organizations/[org-slug]/integrations/ |
| 55 | +# [integration-id] is the top-level `id` of the PagerDuty organization integration |
| 56 | +# [service-id] is the `id` of the service_table record to import under the configData property |
| 57 | +terraform import sentry_integration_pagerduty.default org-slug/integration-id/service-id |
| 58 | +``` |
0 commit comments