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

Create go.yml #15

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
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
15 changes: 15 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
env:
FORCE_COLOR: 1
steps:
- label: ":golang: ci"
command:
- "go get -v -t -d ./..."
- "go build"
- "go test ./..."
plugins:
docker#v1.4.0:
image: "canvadev/ci-docker-node-yarn-chrome-xvfb:2018-09-07"
workdir: /app
agents:
- queue=ci-docker
timeout_in_minutes: 5
28 changes: 28 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Go
on: [push]
jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi

- name: Build
run: go build -v .
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
49 changes: 27 additions & 22 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,33 +1,38 @@
module github.com/jianyuan/terraform-provider-sentry
module github.com/canva/terraform-provider-sentry

require (
cloud.google.com/go/storage v1.0.0 // indirect
github.com/aws/aws-sdk-go v1.25.0 // indirect
cloud.google.com/go v0.50.0 // indirect
cloud.google.com/go/storage v1.4.0 // indirect
github.com/aws/aws-sdk-go v1.26.5 // indirect
github.com/dghubble/sling v1.3.0
github.com/go-test/deep v1.0.4 // indirect
github.com/google/go-cmp v0.3.1 // indirect
github.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9 // indirect
github.com/hashicorp/go-hclog v0.10.1 // indirect
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-plugin-sdk v1.0.0
github.com/hashicorp/terraform v0.12.19
github.com/hashicorp/terraform-svchost v0.0.0-20191119180714-d2e4933b9136 // indirect
github.com/hashicorp/yamux v0.0.0-20190923154419-df201c70410d // indirect
github.com/jianyuan/go-sentry v1.2.0
github.com/mattn/go-colorable v0.1.2 // indirect
github.com/mattn/go-isatty v0.0.9 // indirect
github.com/stretchr/testify v1.4.0 // indirect
github.com/jstemmer/go-junit-report v0.9.1 // indirect
github.com/mattn/go-isatty v0.0.11 // indirect
github.com/mitchellh/mapstructure v1.1.2
github.com/posener/complete v1.2.3 // indirect
github.com/stretchr/testify v1.4.0
github.com/ulikunitz/xz v0.5.6 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
go.opencensus.io v0.22.1 // indirect
golang.org/x/crypto v0.0.0-20190927123631-a832865fa7ad // indirect
golang.org/x/exp v0.0.0-20190925190815-26a69ce95baf // indirect
golang.org/x/net v0.0.0-20190926025831-c00fd9afed17 // indirect
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect
golang.org/x/sys v0.0.0-20190927073244-c990c680b611 // indirect
golang.org/x/tools v0.0.0-20190927052746-69890759d905 // indirect
google.golang.org/api v0.10.0 // indirect
google.golang.org/appengine v1.6.4 // indirect
google.golang.org/genproto v0.0.0-20190926190326-7ee9db18f195 // indirect
google.golang.org/grpc v1.24.0 // indirect
github.com/zclconf/go-cty v1.2.0 // indirect
go.opencensus.io v0.22.2 // indirect
golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 // indirect
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 // indirect
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 // indirect
golang.org/x/sys v0.0.0-20191218084908-4a24b4065292 // indirect
golang.org/x/tools v0.0.0-20191218225520-84f0c7cf60ea // indirect
google.golang.org/api v0.15.0 // indirect
google.golang.org/appengine v1.6.5 // indirect
google.golang.org/genproto v0.0.0-20191216205247-b31c10ee225f // indirect
google.golang.org/grpc v1.26.0 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
)

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

go 1.13
Loading