-
Notifications
You must be signed in to change notification settings - Fork 681
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
Add more retries to resource group deletion #5537
Comments
@ocofaigh terraform-provider-ibm/ibm/service/kubernetes/resource_ibm_container_vpc_cluster.go Line 1022 in 67305d7
Need to analyze even after this wait for delete also resource group n't able to disassociate from that particular instance |
Second approach : |
@hkantare Thanks for feedback. So it sounds like +1 for the second approach too though, as I have seen other resources with similar issues. PAG is another one, as it provisions an sdnlb that terraform state does not know about |
@hkantare Do you think this is something that could be prioritised?
Its something that consumers keep on hitting, especially since most of the Deployable Architectures that are available in the IBM Cloud catalog support creating a resource group. When people do a destroy (especially when OCP cluster are destroyed), the resource group delete fails very frequently with:
|
@ocofaigh |
@hkantare Full output:
|
@ocofaigh Added this retry logic for deletion of resource grp with default timeout of 20 mins. |
Thanks, I see it was released in 1.69.0 so going to close this issue. If I see any issues, I'll let you know |
A common use case is to provision resource group + OCP VPC cluster as part of the same terraform script.
When you provision an OCP VPC cluster, it automatically provisions a VPC load balancer. Terraform does not know about this load balancer (its not in the state file).
So when you run a terraform destroy, it almost always fails on first attempt with the error:
By running the command
ibmcloud resource service-instances --type all -g <resource-group>
I can see that indeed the group still contains a VPC load balancer - for example:If I wait some time, this eventually get deleted and resource group deletion passes. I would like to propose that the terraform provider is updated to add more retries when attempting to delete a resource group to cover such a use case.
An even nicer enhancement would be to actually output the content that are remaining in the resource group that is preventing deletion from occurring.
Community Note
Terraform CLI and Terraform IBM Provider Version
Affected Resource(s)
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Debug Output
Panic Output
Expected Behavior
Actual Behavior
Steps to Reproduce
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: