Looking for a good example or list of inputs to provide for a Terraform script to create a New Relic Slack Alert Channel. The only example I have found was in the Terraform docs, but for email.
Taking a guess here, but Slack probably has different
# Add a notification channel
resource "newrelic_alert_channel" "email" {
name = "email"
type = "email"
configuration = {
recipients = "paul@example.com"
include_json_attachment = "1"
}
}
resource newrelic_alert_channel does support type of slack
.
type - (Required) The type of channel. One of: campfire, email, hipchat, opsgenie, pagerduty, slack, victorops, or webhook.
"slack": {
"channel",
"url",
},
I didn't test, but will this code work?
resource "newrelic_alert_channel" "slack" {
name = "alerts"
type = "slack"
configuration = {
channel = "alerts"
url = "https://hooks.slack.com/services/***********"
}
}