Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(alert_policy): add ability to add multiple channels to a policy #398

Merged
merged 5 commits into from
Feb 13, 2020

Conversation

sanderblue
Copy link
Contributor

Resolves: #319

The PR introduces the ability to add alert channels to a policy during resource creation by allowing the user to supply an array of channel IDs in their Terraform config for a newrelic_alert_policy resource.

Example:

resource "newrelic_alert_policy" "foo" {
  name = "example-policy"
  channel_ids = [
    3156981,
    3103316
  ]
}

It should be noted that the user will not be able to import the channel IDs. However, a user can still import the primary resource, add channel IDs to their HCL, and then use terraform apply to add the channels to the policy.

@ghost ghost added the size/L label Feb 13, 2020
@ghost ghost added the documentation Improvements or additions to documentation label Feb 13, 2020
@sanderblue sanderblue force-pushed the feat/multiple-channels-per-policy branch from bcf0a2a to 17d8ccf Compare February 13, 2020 02:46
@sanderblue sanderblue force-pushed the feat/multiple-channels-per-policy branch from 17d8ccf to 4bf2d5a Compare February 13, 2020 18:15
Copy link
Contributor

@zlesnr zlesnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work. This looks good to me.

newrelic/resource_newrelic_alert_policy.go Outdated Show resolved Hide resolved
newrelic/structures_newrelic_alert_policy.go Outdated Show resolved Hide resolved
@sanderblue sanderblue merged commit 47d809d into master Feb 13, 2020
@sanderblue sanderblue deleted the feat/multiple-channels-per-policy branch February 13, 2020 22:59
kidk pushed a commit to aminoz007/terraform-provider-newrelic that referenced this pull request Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to provision multiple alert notification channels to an alert policy
3 participants