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
If I try to manually remove that Contact Point via the API first, then I get:
{"message":"Contact point is currently referenced by a notification policy.","messageId":"alerting.notifications.contact-points.referenced","statusCode":409,"traceID":"fdd47c6ffcd5bc66f47a2453367e96c9"}
Which is understandable...
Because we've got the provisioned = true attribute set on the notification policy, we can't manually delete the reference to the contact point.
Steps to Reproduce
terraform apply the config as supplied
Remove team2 from the map.
terraform plan
get a legitimate-looking plan (delete 1 contact point, update notification policy).
terraform apply - fails to delete contact point
doesn't attempt to update notification policy.
Important Factoids
It's perhaps debatable whether this is a Terraform issue or a provider issue? I suppose if the provider called the DeleteContactPoint API, with a flag that represented "cascade to all references", then this could be fixed.
I could break the dependency on notification_policy -> contact_point, by not using Terraform implict dependencies, but I expect that if I did that then I'd get an error on creation, rather than destruction, due to trying to add a contact point which doesn't yet exist into a notification policy?
References
No response
The text was updated successfully, but these errors were encountered:
Terraform Version
1.5.7
Terraform Grafana Provider Version
2.19.4
Grafana Version
11.3.0-75420.patch2-75797 (cloud)
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
If I remove a team from the
local.teams
map, I should be able to apply a plan that successfully removes:a) The contact point from the notification policy
b) The contact point entirely
Currently the dependency tree, and resource creation, works well for creating the resources, but not so much for destroying them.
Actual Behavior
An error like this:
If I try to manually remove that Contact Point via the API first, then I get:
Which is understandable...
Because we've got the
provisioned = true
attribute set on the notification policy, we can't manually delete the reference to the contact point.Steps to Reproduce
terraform apply
the config as suppliedteam2
from the map.terraform plan
terraform apply
- fails to delete contact pointImportant Factoids
It's perhaps debatable whether this is a Terraform issue or a provider issue? I suppose if the provider called the DeleteContactPoint API, with a flag that represented "cascade to all references", then this could be fixed.
I could break the dependency on notification_policy -> contact_point, by not using Terraform implict dependencies, but I expect that if I did that then I'd get an error on creation, rather than destruction, due to trying to add a contact point which doesn't yet exist into a notification policy?
References
No response
The text was updated successfully, but these errors were encountered: