2016-11-23 18:28:30 +01:00
|
|
|
---
|
|
|
|
layout: "newrelic"
|
|
|
|
page_title: "New Relic: newrelic_alert_channel"
|
|
|
|
sidebar_current: "docs-newrelic-resource-alert-channel"
|
|
|
|
description: |-
|
|
|
|
Create and manage a notification channel for alerts in New Relic.
|
|
|
|
---
|
|
|
|
|
|
|
|
# newrelic\_alert\_channel
|
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
2017-04-17 12:17:54 +02:00
|
|
|
```hcl
|
2016-11-23 18:28:30 +01:00
|
|
|
resource "newrelic_alert_channel" "foo" {
|
|
|
|
name = "foo"
|
2017-02-18 23:48:50 +01:00
|
|
|
type = "email"
|
|
|
|
|
|
|
|
configuration = {
|
|
|
|
recipients = "foo@example.com"
|
|
|
|
include_json_attachment = "1"
|
|
|
|
}
|
2016-11-23 18:28:30 +01:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
|
|
|
* `name` - (Required) The name of the channel.
|
2017-01-15 13:27:24 +01:00
|
|
|
* `type` - (Required) The type of channel. One of: `campfire`, `email`, `hipchat`, `opsgenie`, `pagerduty`, `slack`, `victorops`, or `webhook`.
|
2016-11-23 18:28:30 +01:00
|
|
|
* `configuration` - (Required) A map of key / value pairs with channel type specific values.
|
|
|
|
|
|
|
|
## Attributes Reference
|
|
|
|
|
|
|
|
The following attributes are exported:
|
|
|
|
|
|
|
|
* `id` - The ID of the channel.
|
|
|
|
|
|
|
|
## Import
|
|
|
|
|
|
|
|
Alert channels can be imported using the `id`, e.g.
|
|
|
|
|
|
|
|
```
|
|
|
|
$ terraform import newrelic_alert_channel.main 12345
|
|
|
|
```
|