-
-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: New
organization_repository
resource (#500)
* feat: New organization_repository resource * feat: add tests and update docs * feat: add secrets to gh workflow * fix: sweep during pre-check * ref: add deprecation message
- Loading branch information
Showing
16 changed files
with
581 additions
and
29 deletions.
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
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,65 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "sentry_organization_repository Resource - terraform-provider-sentry" | ||
subcategory: "" | ||
description: |- | ||
Organization Repository resource. This resource manages Sentry's source code management integrations. | ||
--- | ||
|
||
# sentry_organization_repository (Resource) | ||
|
||
Organization Repository resource. This resource manages Sentry's source code management integrations. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
# GitHub | ||
data "sentry_organization_integration" "github" { | ||
organization = "my-organization" | ||
provider_key = "github" | ||
name = "my-github-organization" | ||
} | ||
resource "sentry_organization_repository" "github" { | ||
organization = "my-organization" | ||
integration_type = "github" | ||
integration_id = data.sentry_organization_integration.github.internal_id | ||
identifier = "my-github-organization/my-github-repo" | ||
} | ||
# Azure DevOps | ||
data "sentry_organization_repository" "vsts" { | ||
organization = "my-organization" | ||
provider_key = "vsts" | ||
name = "my-azure-devops-organization" | ||
} | ||
resource "sentry_organization_repository" "vsts" { | ||
organization = "my-organization" | ||
integration_type = "vsts" | ||
integration_id = data.sentry_organization_integration.vsts.internal_id | ||
identifier = "5febef5a-833d-4e14-b9c0-14cb638f91e6" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `identifier` (String) The identifier of the repository. For GitHub, GitLab and BitBucket, it is `{organization}/{repository}`. For VSTS, it is the [repository ID](https://learn.microsoft.com/en-us/rest/api/azure/devops/git/repositories/get#get-a-repository-by-repositoryid). | ||
- `integration_id` (String) The ID of the organization integration. Source from the URL `https://<organization>.sentry.io/settings/integrations/<integration-type>/<integration-id>/` or use the `sentry_organization_integration` data source. | ||
- `integration_type` (String) The type of the organization integration. Supported values are `github`, `github_enterprise`, `gitlab`, `vsts` (Azure DevOps), `bitbucket`, and `bitbucket_server`. | ||
- `organization` (String) The slug of the organization the resource belongs to. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
terraform import sentry_organization_repository.this org-slug/integration-type/integration-id/internal-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
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 @@ | ||
terraform import sentry_organization_repository.this org-slug/integration-type/integration-id/internal-id |
27 changes: 27 additions & 0 deletions
27
examples/resources/sentry_organization_repository/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,27 @@ | ||
# GitHub | ||
data "sentry_organization_integration" "github" { | ||
organization = "my-organization" | ||
provider_key = "github" | ||
name = "my-github-organization" | ||
} | ||
|
||
resource "sentry_organization_repository" "github" { | ||
organization = "my-organization" | ||
integration_type = "github" | ||
integration_id = data.sentry_organization_integration.github.internal_id | ||
identifier = "my-github-organization/my-github-repo" | ||
} | ||
|
||
# Azure DevOps | ||
data "sentry_organization_repository" "vsts" { | ||
organization = "my-organization" | ||
provider_key = "vsts" | ||
name = "my-azure-devops-organization" | ||
} | ||
|
||
resource "sentry_organization_repository" "vsts" { | ||
organization = "my-organization" | ||
integration_type = "vsts" | ||
integration_id = data.sentry_organization_integration.vsts.internal_id | ||
identifier = "5febef5a-833d-4e14-b9c0-14cb638f91e6" | ||
} |
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
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.