-
-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: new
sentry_integration_pagerduty
resource (#430)
- Loading branch information
Showing
9 changed files
with
605 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "sentry_integration_pagerduty Resource - terraform-provider-sentry" | ||
subcategory: "" | ||
description: |- | ||
Manage a PagerDuty service integration. | ||
--- | ||
|
||
# sentry_integration_pagerduty (Resource) | ||
|
||
Manage a PagerDuty service integration. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
# Retrieve the PagerDuty organization integration | ||
data "sentry_organization_integration" "pagerduty" { | ||
organization = local.organization | ||
provider_key = "pagerduty" | ||
name = "my-pagerduty-organization" | ||
} | ||
# Associate a PagerDuty service and integration key with a Sentry PagerDuty integration | ||
resource "sentry_integration_pagerduty" "test" { | ||
organization = local.organization | ||
integration_id = data.sentry_organization_integration.pagerduty.id | ||
service = "my-pagerduty-service" | ||
integration_key = "my-pagerduty-integration-key" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `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. | ||
- `integration_key` (String) The integration key of the PagerDuty service. | ||
- `organization` (String) The slug of the organization the resource belongs to. | ||
- `service` (String) The name of the PagerDuty service. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
# import using the organization slug from the URL: | ||
# https://sentry.io/api/0/organizations/[org-slug]/integrations/ | ||
# [integration-id] is the top-level `id` of the PagerDuty organization integration | ||
# [service-id] is the `id` of the service_table record to import under the configData property | ||
terraform import sentry_integration_pagerduty.default org-slug/integration-id/service-id | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# import using the organization slug from the URL: | ||
# https://sentry.io/api/0/organizations/[org-slug]/integrations/ | ||
# [integration-id] is the top-level `id` of the PagerDuty organization integration | ||
# [service-id] is the `id` of the service_table record to import under the configData property | ||
terraform import sentry_integration_pagerduty.default org-slug/integration-id/service-id |
16 changes: 16 additions & 0 deletions
16
examples/resources/sentry_integration_pagerduty/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Retrieve the PagerDuty organization integration | ||
data "sentry_organization_integration" "pagerduty" { | ||
organization = local.organization | ||
|
||
provider_key = "pagerduty" | ||
name = "my-pagerduty-organization" | ||
} | ||
|
||
# Associate a PagerDuty service and integration key with a Sentry PagerDuty integration | ||
resource "sentry_integration_pagerduty" "test" { | ||
organization = local.organization | ||
integration_id = data.sentry_organization_integration.pagerduty.id | ||
|
||
service = "my-pagerduty-service" | ||
integration_key = "my-pagerduty-integration-key" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.