Skip to content

Commit

Permalink
Merge pull request #45 from drivetopurchase/master
Browse files Browse the repository at this point in the history
Add alerting
  • Loading branch information
jianyuan authored Dec 2, 2019
2 parents 1176a44 + 8aec020 commit 0ebb06d
Show file tree
Hide file tree
Showing 6 changed files with 468 additions and 3 deletions.
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
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

0 comments on commit 0ebb06d

Please sign in to comment.