You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm unable to directly create newrelic_notification_destination objects with a private Slack channel ID set. In order to use private Slack channels, I have to first create it with a public Slack channel, then do a second terraform apply to update the existing object to point at a private Slack channel. I've verified the NR integration can see all private channels already in the UI. Not sure if this is intended behaviour but it's just annoying to deal with.
When trying to create, the channel can never be found. It takes two applies to use private channels with this pattern, first we have to set it to a public Slack channel, then update it to a private channel afterwards:
Error: UNKNOWN_ERROR: An unknown error has occurred
with module.bootstrap["example-service"].newrelic_notification_channel.notify_slack,
on ../../modules/bootstrap/default-service-workflows/main.tf line 83, in resource "newrelic_notification_channel" "notify_slack":
83: resource "newrelic_notification_channel" "notify_slack" {
channel_not_found
Hey @jmangs, I tried to reproduce your error but it worked for me.
I'm not sure exactly what is the problem, can it be the provider version you're using? I suggest bumping the version to the latest one and check it again.
Also the reference seem to be related to using slack channel name, not to channel id, and from what I understand your issue is solely with channel id.
We're on 3.34.1. I've resorted to doing double applies to work around it for now:
module.bootstrap["apns"].newrelic_notification_channel.notify_slack: Creating...
Error: UNKNOWN_ERROR: An unknown error has occurred
with module.bootstrap["apns"].newrelic_notification_channel.notify_slack,
on ../../modules/bootstrap/default-service-workflows/main.tf line 83, in resource "newrelic_notification_channel" "notify_slack":
83: resource "newrelic_notification_channel" "notify_slack" {
channel_not_found
Plan for updating back to a private channel (only showing one entry to avoid spam):
# module.bootstrap["apns"].newrelic_notification_channel.notify_slack will be updated in-place
~ resource "newrelic_notification_channel" "notify_slack" {
id = "OBJECT_ID"
name = "apns-default-notify-slack"
# (6 unchanged attributes hidden)
- property {
- key = "channelId" -> null
- value = "OLD_ID" -> null
}
- property {
- key = "source" -> null
- label = "terraform-source-internal" -> null
- value = "terraform" -> null
}
+ property {
+ key = "channelId"
+ value = "NEW_ID"
}
+ property {
+ key = "source"
+ label = "terraform-source-internal"
+ value = "terraform"
}
}
Plan: 0 to add, 1 to change, 0 to destroy.
module.bootstrap["apns"].newrelic_notification_channel.notify_slack: Modifying... [id=OBJECT_ID]
module.bootstrap["apns"].newrelic_notification_channel.notify_slack: Modifications complete after 1s [id=OBJECT_ID]
Looking at the Go code, it's getting the error in this call I believe: resource_newrelic_notifications_channel.go#L93 - maybe it's something with our Workflow permissions since the failure is coming from newrelic-client-go. Doesn't explain why create doesn't work but update does.
I'm unable to directly create
newrelic_notification_destination
objects with a private Slack channel ID set. In order to use private Slack channels, I have to first create it with a public Slack channel, then do a secondterraform apply
to update the existing object to point at a private Slack channel. I've verified the NR integration can see all private channels already in the UI. Not sure if this is intended behaviour but it's just annoying to deal with.Terraform Version
Terraform v1.7.5
Affected Resource(s)
newrelic_notification_channel
Terraform Configuration
Actual Behavior
When trying to create, the channel can never be found. It takes two applies to use private channels with this pattern, first we have to set it to a public Slack channel, then update it to a private channel afterwards:
The second apply successfully updates:
Expected Behavior
What should have happened?
Steps to Reproduce
newrelic_notification_channel
with a private channel ID set.terraform apply
newrelic_notification_channel
to a public channel ID.terraform apply
newrelic_notification_channel
to a private channel ID.terraform apply
Debug Output
N/A
Panic Output
N/A
Important Factoids
N/A
References
Other users have seen this issue in #2070 - similar validation failure happens there:
The text was updated successfully, but these errors were encountered: