Skip to content

Commit

Permalink
Update go-honeycombio; add support for webhook trigger recipients
Browse files Browse the repository at this point in the history
Closes #32
  • Loading branch information
Koenraad Verheyden committed Sep 9, 2020
1 parent 775ae84 commit 15bb121
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion docs/data-sources/trigger_recipient.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ resource "honeycombio_trigger" "example" {
The following arguments are supported:

* `dataset` - (Required) Search through all triggers linked to this dataset.
* `type` - (Required) The type of recipient, allowed types are `email`, `marker`, `pagerduty` and `slack`.
* `type` - (Required) The type of recipient, allowed types are `email`, `marker`, `pagerduty`, `slack` and `webhook`.
* `target` - (Optional) Target of the trigger, this has another meaning depending on the type of recipient (see the table below).

Type | Target
Expand All @@ -60,6 +60,7 @@ email | an email address
marker | name of the marker
pagerduty | _N/A_
slack | name of the channel
webhook | name of the webhook

## Attribute Reference

Expand Down
3 changes: 2 additions & 1 deletion docs/resources/trigger.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Each trigger configuration must contain exactly one `threshold` block, which acc

Each trigger configuration may have zero or more `recipient` blocks, which each accept the following arguments. A trigger recipient block can either refer to an existing recipient (a recipient that is already present in another trigger) or a new recipient. When specifying an existing recipient, only `id` must be set. To retrieve the ID of an existing recipient, refer to the [`honeycombio_trigger_recipient`](../data-sources/trigger_recipient.md) data source.

* `type` - (Optional) The type of the trigger recipient, allowed types are `email`, `marker`, `pagerduty` and `slack`. Should not be used in combination with `id`.
* `type` - (Optional) The type of the trigger recipient, allowed types are `email`, `marker`, `pagerduty`, `slack` and `webhook`. Should not be used in combination with `id`.
* `target` - (Optional) Target of the trigger recipient, this has another meaning depending on the type of recipient (see the table below). Should not be used in combination with `id`.
* `id` - (Optional) The ID of an already existing recipient. Should not be used in combination with `type` and `target`.

Expand All @@ -80,6 +80,7 @@ email | an email address
marker | name of the marker
pagerduty | _N/A_
slack | name of the channel
webhook | name of the webhook

~> **NOTE** Recipients of type `slack` can not be created using the API. Instead, you have to refer to existing Slack recipients using their ID. Refer to [Specifying Recipients](https://docs.honeycomb.io/api/triggers/#specifying-recipients) for more information. You can use the [`honeycombio_trigger_recipient`](../data-sources/trigger_recipient.md) data source to find an already existing recipient.

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ go 1.14
require (
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
github.com/hashicorp/terraform-plugin-sdk/v2 v2.0.1
github.com/kvrhdn/go-honeycombio v0.1.0
github.com/kvrhdn/go-honeycombio v0.1.1
github.com/stretchr/testify v1.6.1
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kvrhdn/go-honeycombio v0.1.0 h1:6ustPL3+VuBnUZRhtxc0DBjEmg0XByuiR27ijWVEgcA=
github.com/kvrhdn/go-honeycombio v0.1.0/go.mod h1:UA4oLwic817uNHzdzZotn5j0xSk9paBaPYODFhEDci8=
github.com/kvrhdn/go-honeycombio v0.1.1 h1:d/OzPqs2jVgIBqqJwJl204HlNLuJOuGti5VfU8/5DVY=
github.com/kvrhdn/go-honeycombio v0.1.1/go.mod h1:UA4oLwic817uNHzdzZotn5j0xSk9paBaPYODFhEDci8=
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
Expand Down

0 comments on commit 15bb121

Please sign in to comment.