Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add alerting #45

Merged
merged 1 commit into from
Dec 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,53 @@ The following attributes are exported:

* `id` - The ID of the created plugin.

#### `sentry_rule`

##### Example Usage

```
# Create a plugin

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually "Create a rule", right?

resource "sentry_rule" "default" {
organization = "my-organization"
project = "web-app"
action_match = "any"
frequency = 30
environment = "production"

actions = [{
id = "sentry.rules.actions.notify_event.NotifyEventAction"
}]

conditions = [{
id = "sentry.rules.conditions.first_seen_event.FirstSeenEventCondition"
}]
}
```

##### Argument Reference

The following arguments are supported:

* `organization` - (Required) The slug of the organization the plugin should be enabled for.
* `project` - (Required) The slug of the project the plugin should be enabled for.
* `action_match` - (Optional) Use `all` to trigger alerting when all conditions are met, and `any` when at least a condition is met. Defaults to `any`.
* `frequency` - (Optional) Perform actions at most once every `X` minutes for this issue. Defaults to `30`.
* `environment` - (Optional) Environment name
* `actions` - (Required) List of actions
* `conditions` - (Required) List of conditions

##### Attributes Reference

The following attributes are exported:

* `id` - The ID of the created rule.
* `name` - The name of the created rule.
* `actions` - The rule's actions.
* `conditions` - The rule's conditions.
* `frequency` - The rule's frequency.
* `environment` - The rule's environment.


### Data Source Configuration

#### `sentry_key`
Expand Down
6 changes: 5 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ require (
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/hcl2 v0.0.0-20190909202536-66c59f909e25 // indirect
github.com/hashicorp/hil v0.0.0-20190212132231-97b3a9cdfa93 // indirect
github.com/hashicorp/terraform v0.12.9
github.com/hashicorp/terraform-plugin-sdk v1.0.0
github.com/hashicorp/yamux v0.0.0-20190923154419-df201c70410d // indirect
github.com/jianyuan/go-sentry v1.2.0
github.com/jianyuan/go-sentry v1.2.1-0.20190908221954-a2cc36d4dbf5
github.com/mattn/go-colorable v0.1.2 // indirect
github.com/mattn/go-isatty v0.0.9 // indirect
github.com/mitchellh/mapstructure v1.1.2
github.com/stretchr/testify v1.4.0 // indirect
github.com/ulikunitz/xz v0.5.6 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
Expand All @@ -31,3 +33,5 @@ require (
)

replace git.apache.org/thrift.git => github.com/apache/thrift v0.0.0-20180902110319-2566ecd5d999 // indirect

go 1.13
Loading