From 15bb12133a7164942df1f70362612f84a7ef22fb Mon Sep 17 00:00:00 2001 From: Koenraad Verheyden Date: Thu, 10 Sep 2020 01:55:28 +0200 Subject: [PATCH] Update go-honeycombio; add support for webhook trigger recipients Closes #32 --- docs/data-sources/trigger_recipient.md | 3 ++- docs/resources/trigger.md | 3 ++- go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/data-sources/trigger_recipient.md b/docs/data-sources/trigger_recipient.md index 519ace07..d7082897 100644 --- a/docs/data-sources/trigger_recipient.md +++ b/docs/data-sources/trigger_recipient.md @@ -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 @@ -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 diff --git a/docs/resources/trigger.md b/docs/resources/trigger.md index b0609d63..372322c8 100644 --- a/docs/resources/trigger.md +++ b/docs/resources/trigger.md @@ -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`. @@ -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. diff --git a/go.mod b/go.mod index 5fb655ed..90b0da41 100644 --- a/go.mod +++ b/go.mod @@ -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 ) diff --git a/go.sum b/go.sum index a2c1642b..89ca5c48 100644 --- a/go.sum +++ b/go.sum @@ -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=