-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Not possible to delete uptime check (google_monitoring_uptime_check_config) #10176
Not possible to delete uptime check (google_monitoring_uptime_check_config) #10176
Comments
I can't reproduce this - could you please add an example minimal terraform configuration that demonstrates this behavior? |
Hi @melinath , sorry for such a delay. I have also tried to reproduce this on a clean state and found that this is happening when there is an alerting policy defined for such check, following tf config is affected:
So to reproduce, make apply with above configuration, then modify a host (in monitored_resource), TF will say it needs to replace check_config and will fail on trying to destroy. |
I'm also encountering the same bug where a uptime check config period update forces a resource replacement and the API is failing on deletion with |
I also encountered this issue exactly as described, an uptime check with a linked alert policy cannot be destroyed+created, I didn't check if just destroy works, which I assume will work because the policy depends on details from the uptime check and will be destroyed first so the uptime check delete won't fail. For now, Since it isn't something we do often, I opted for the ugly workaround, deleted the relevant policies, planned and applied. The uptime checks were destroyed, created and then the alert policies were created from fresh, which is a good enough result for my use case. |
This issue is solved/mitigated by the solution highlighted in #3133 (comment) I only wish it was documented, since I think it's a common use case and nobody should be requested to infer the logical lifecycle of GCP resources behind a generic 400 error code |
I will add an error message for 400s that mentions making sure all Alert Policies are deleted first. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
v1.0.5
provider: 3.86.0
Affected Resource(s)
google_monitoring_uptime_check_config
Debug Output
This get 400 back from API saying it contains invalid argument
Panic Output
Expected Behavior
Check should get deleted.
Actual Behavior
Check doesn't get deleted and TF throws an error
Steps to Reproduce
Important Factoids
References
b/305279561
The text was updated successfully, but these errors were encountered: