From af647bb290722369e8c1294562abd57ffab76617 Mon Sep 17 00:00:00 2001 From: Pawel Date: Fri, 3 Nov 2023 23:22:56 -0700 Subject: [PATCH 1/3] update terraform integration documentation --- docs/resources/integration.md | 55 +++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 3 deletions(-) diff --git a/docs/resources/integration.md b/docs/resources/integration.md index 726ebff4..252477e3 100644 --- a/docs/resources/integration.md +++ b/docs/resources/integration.md @@ -1,11 +1,14 @@ `rollbar_integration` Resource ========================= -Rollbar projects can be configured with different notification integrations (aka "channels") and rules for when to send notifications to those integration platforms. This resource manages the configuration for the integrations(limited to the Slack channel at the moment) for the project configured for the Rollbar provider. +Rollbar projects can be configured with different notification integrations (aka "channels") and rules for when to send notifications to those integration platforms. This resource manages the configuration for the integrations(limited to the Slack, Webhook, Email and PagerDuty channels at the moment) for the project configured for the Rollbar provider. -This resource can manage configuration for the Slack channel. See the following api documentation for more details about the arguments with respect to the Slack channel: +This resource can manage configuration for the Slack, Webhook, Email and PagerDuty channels. See the following api documentation for more details about the arguments with respect to these channels: -* [Rollbar API Slack Integration](https://docs.rollbar.com/reference/notification-channels) +* [Rollbar API Slack Integration](https://docs.rollbar.com/reference/put_api-1-notifications-slack) +* [Rollbar API Webhook Integration](https://docs.rollbar.com/reference/put_api-1-notifications-webhook) +* [Rollbar API Email Integration](https://docs.rollbar.com/reference/put_api-1-notifications-email) +* [Rollbar API PagerDuty Integration](https://docs.rollbar.com/reference/put_api-1-notifications-pagerduty) Example Usage ------------- @@ -34,6 +37,36 @@ resource "rollbar_integration" "slack_integration" { show_message_buttons = true } } + +# Configure the Webhook integration for the project +# + +resource "rollbar_integration" "webhook_integration" { + webhook { + enabled = true + url = "https://www.some-website.com" + } +} + +# Configure the Email integration for the project +# + +resource "rollbar_integration" "email_integration" { + email { + enabled = true + scrub_params = true + } +} + +# Configure the PagerDuty integration for the project +# + +resource "rollbar_integration" "pagerduty_integration" { + pagerduty { + enabled = false + service_key = "123456789" + } +} ``` Argument Reference @@ -48,6 +81,22 @@ Slack: * `channel` - (Required) The default Slack channel name to send the messages. Requires a `#` as a prefix * `show_message_buttons` - Boolean that enables the Slack actionable buttons +Webhook: + +* `enabled` - (Required) Boolean that enables the Webhook notifications globally +* `url` - (Required) URL for the webhook. + +Email: + +* `enabled` - (Required) Boolean that enables the Email notifications globally +* `scrub_params` - Optional Boolean that enables scrubbing param values (when set to true) + +PagerDuty: + +* `enabled` - (Required) Boolean that enables the PagerDuty notifications globally +* `service_key` - (Required) PagerDuty service key linked to PagerDuty account + + Attribute Reference ------------------- From 3b045258b200b01a1ed4a915bc15b29266dad7b5 Mon Sep 17 00:00:00 2001 From: Pawel Date: Fri, 3 Nov 2023 23:28:11 -0700 Subject: [PATCH 2/3] cleanup --- docs/resources/integration.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/resources/integration.md b/docs/resources/integration.md index 252477e3..3bfb85d2 100644 --- a/docs/resources/integration.md +++ b/docs/resources/integration.md @@ -96,7 +96,6 @@ PagerDuty: * `enabled` - (Required) Boolean that enables the PagerDuty notifications globally * `service_key` - (Required) PagerDuty service key linked to PagerDuty account - Attribute Reference ------------------- From bc0e7ba08dd24e3663b4fa9d79c39d2df0ad24ba Mon Sep 17 00:00:00 2001 From: Pawel Date: Mon, 6 Nov 2023 08:38:05 -0800 Subject: [PATCH 3/3] addressing PR comments --- docs/resources/integration.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/resources/integration.md b/docs/resources/integration.md index 3bfb85d2..09485ab0 100644 --- a/docs/resources/integration.md +++ b/docs/resources/integration.md @@ -5,10 +5,10 @@ Rollbar projects can be configured with different notification integrations (aka This resource can manage configuration for the Slack, Webhook, Email and PagerDuty channels. See the following api documentation for more details about the arguments with respect to these channels: -* [Rollbar API Slack Integration](https://docs.rollbar.com/reference/put_api-1-notifications-slack) -* [Rollbar API Webhook Integration](https://docs.rollbar.com/reference/put_api-1-notifications-webhook) +* [Rollbar API Slack Integration](https://docs.rollbar.com/reference/put_api-1-notifications-slack), [Rollbar Slack Integration Documentation](https://docs.rollbar.com/docs/slack) +* [Rollbar API Webhook Integration](https://docs.rollbar.com/reference/put_api-1-notifications-webhook), [Rollbar Webhook Integration Documentation](https://docs.rollbar.com/docs/webhook) +* [Rollbar API PagerDuty Integration](https://docs.rollbar.com/reference/put_api-1-notifications-pagerduty), [Rollbar PagerDuty Integration Documentation](https://docs.rollbar.com/docs/pagerduty) * [Rollbar API Email Integration](https://docs.rollbar.com/reference/put_api-1-notifications-email) -* [Rollbar API PagerDuty Integration](https://docs.rollbar.com/reference/put_api-1-notifications-pagerduty) Example Usage ------------- @@ -44,7 +44,7 @@ resource "rollbar_integration" "slack_integration" { resource "rollbar_integration" "webhook_integration" { webhook { enabled = true - url = "https://www.some-website.com" + url = "https://www.example.com" } }