-
-
Notifications
You must be signed in to change notification settings - Fork 134
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_all_projects_spike_protection
resource (#429)
- Loading branch information
Showing
11 changed files
with
537 additions
and
89 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_all_projects_spike_protection Resource - terraform-provider-sentry" | ||
subcategory: "" | ||
description: |- | ||
Enable spike protection for all projects in an organization. | ||
--- | ||
|
||
# sentry_all_projects_spike_protection (Resource) | ||
|
||
Enable spike protection for all projects in an organization. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
# Enable spike protection for several projects in a Sentry organization. | ||
resource "sentry_project" "web-app" { | ||
organization = "my-organization" | ||
teams = ["my-first-team"] | ||
name = "web-app" | ||
slug = "web-app" | ||
platform = "go" | ||
} | ||
resource "sentry_project" "mobile-app" { | ||
organization = "my-organization" | ||
teams = ["my-second-team"] | ||
name = "mobile-app" | ||
slug = "mobile-app" | ||
platform = "android" | ||
} | ||
resource "sentry_all_projects_spike_protection" "main" { | ||
organization = "my-organization" | ||
projects = [ | ||
sentry_project.web-app.id, | ||
sentry_project.mobile-app.id, | ||
] | ||
enabled = true | ||
} | ||
# Use the `sentry_all_projects` data source to get all projects in a Sentry organization and enable spike protection for all of them. | ||
data "sentry_all_projects" "all" { | ||
organization = "my-organization" | ||
} | ||
resource "sentry_all_projects_spike_protection" "main" { | ||
organization = data.sentry_all_projects.all.organization | ||
projects = data.sentry_all_projects.all.project_slugs | ||
enabled = true | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `enabled` (Boolean) Toggle the browser-extensions, localhost, filtered-transaction, or web-crawlers filter on or off for all projects. | ||
- `organization` (String) The slug of the organization the resource belongs to. | ||
- `projects` (Set of String) The slugs of the projects to enable or disable spike protection for. |
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
40 changes: 40 additions & 0 deletions
40
examples/resources/sentry_all_projects_spike_protection/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,40 @@ | ||
# Enable spike protection for several projects in a Sentry organization. | ||
resource "sentry_project" "web-app" { | ||
organization = "my-organization" | ||
|
||
teams = ["my-first-team"] | ||
name = "web-app" | ||
slug = "web-app" | ||
|
||
platform = "go" | ||
} | ||
|
||
resource "sentry_project" "mobile-app" { | ||
organization = "my-organization" | ||
|
||
teams = ["my-second-team"] | ||
name = "mobile-app" | ||
slug = "mobile-app" | ||
|
||
platform = "android" | ||
} | ||
|
||
resource "sentry_all_projects_spike_protection" "main" { | ||
organization = "my-organization" | ||
projects = [ | ||
sentry_project.web-app.id, | ||
sentry_project.mobile-app.id, | ||
] | ||
enabled = true | ||
} | ||
|
||
# Use the `sentry_all_projects` data source to get all projects in a Sentry organization and enable spike protection for all of them. | ||
data "sentry_all_projects" "all" { | ||
organization = "my-organization" | ||
} | ||
|
||
resource "sentry_all_projects_spike_protection" "main" { | ||
organization = data.sentry_all_projects.all.organization | ||
projects = data.sentry_all_projects.all.project_slugs | ||
enabled = true | ||
} |
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.