Skip to content

Commit

Permalink
ref: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jianyuan committed Dec 9, 2023
1 parent 02b162c commit 475b531
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 0 deletions.
61 changes: 61 additions & 0 deletions docs/resources/project_inbound_data_filter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "sentry_project_inbound_data_filter Resource - terraform-provider-sentry"
subcategory: ""
description: |-
Sentry Project Inbound Data Filter resource. This resource is used to create and manage inbound data filters for a project. For more information on what filters are available, see the Sentry documentation https://docs.sentry.io/api/projects/update-an-inbound-data-filter/.
---

# sentry_project_inbound_data_filter (Resource)

Sentry Project Inbound Data Filter resource. This resource is used to create and manage inbound data filters for a project. For more information on what filters are available, see the [Sentry documentation](https://docs.sentry.io/api/projects/update-an-inbound-data-filter/).

## Example Usage

```terraform
resource "sentry_project" "default" {
organization = "my-organization"
teams = ["my-first-team", "my-second-team"]
name = "web-app"
platform = "javascript"
}
# Create an inbound data filter for a project
resource "sentry_project_inbound_data_filter" "test" {
organization = sentry_project.default.organization
project_slug = sentry_project.default.slug
filter_id = "browser-extensions"
active = true
}
# Create an inbound data filter with subfilters. Only applicable to the
# `legacy-browser` filter.
resource "sentry_project_inbound_data_filter" "test" {
organization = sentry_project.default.organization
project_slug = sentry_project.default.slug
filter_id = "legacy-browser"
subfilters = ["ie_pre_9", "ie9"]
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `filter_id` (String) The type of filter toggle to update. See the [Sentry documentation](https://docs.sentry.io/api/projects/update-an-inbound-data-filter/) for a list of available filters.
- `organization` (String) The slug of the organization the project belongs to.
- `project_slug` (String) The slug of the project to create the filter for.

### Optional

- `active` (Boolean) Toggle the browser-extensions, localhost, filtered-transaction, or web-crawlers filter on or off.
- `subfilters` (List of String) Specifies which legacy browser filters should be active. Anything excluded from the list will be disabled. See the [Sentry documentation](https://docs.sentry.io/api/projects/update-an-inbound-data-filter/) for a list of available subfilters.

### Read-Only

- `id` (String) The ID of this resource.


25 changes: 25 additions & 0 deletions examples/resources/sentry_project_inbound_data_filter/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
resource "sentry_project" "default" {
organization = "my-organization"

teams = ["my-first-team", "my-second-team"]
name = "web-app"

platform = "javascript"
}

# Create an inbound data filter for a project
resource "sentry_project_inbound_data_filter" "test" {
organization = sentry_project.default.organization
project_slug = sentry_project.default.slug
filter_id = "browser-extensions"
active = true
}

# Create an inbound data filter with subfilters. Only applicable to the
# `legacy-browser` filter.
resource "sentry_project_inbound_data_filter" "test" {
organization = sentry_project.default.organization
project_slug = sentry_project.default.slug
filter_id = "legacy-browser"
subfilters = ["ie_pre_9", "ie9"]
}

0 comments on commit 475b531

Please sign in to comment.