-
Notifications
You must be signed in to change notification settings - Fork 285
Error Destination in use when trying to destroy notification destination via terraform #3021
Description
Error
Unable to delete notification destination managed by terraform due to destination in use error. The destination is turned off in New Relic.
Terraform Version
terraform_version: 1.9.4
Affected Resource(s)
Please list the resources as a list, for example:
newrelic_alert_policynewrelic_alert_channel
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Terraform Configuration
Please include your
providerconfiguration (sensitive details redacted) as well as the configuration of the resources and/or data sources related to the bug report.
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 6.0"
}
newrelic = {
source = "newrelic/newrelic"
version = "~> 3.0"
}
opsgenie = {
source = "opsgenie/opsgenie"
version = "~> 0.6"
}
}Actual Behavior
An error occurred when trying to delete a newrelic_notification_destination that was created with terraform. The error was:
newrelic_notification_destination.opsgenie: Destroying... [id=[REDACTED]]
╷
│ Error: ENTITY_IN_USE: This operation could not be completed because the entity is in use
│
│
╵
Expected Behavior
The notification destination should have been deleted. The notification destination was disabled in New Relic console before attempting to delete via terraform.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
- Create notification destination in terraform
- Disable notification destination in NR UI
terraform apply- Destination is not deleted and terraform error occurs
Important Factoids
References
Seems to be related to: #2277 which was closed because the original reporter never answered.