terraform-deploy
terraform-deploy copied to clipboard
Terraform Problems
When terraform destroy
ing, I often get:
Error: timeout while waiting for resource to be gone (last state: 'Terminating', timeout: 5m0s)
I think this is waiting for the kubernetes namespaces to be destroyed and it doesn't find them. I can see
kubernetes_namespace.support: Still destroying... [id=support, 5m0s elapsed]
above, but I never see a message that it got destroyed.
There have been two common cases where this occurs:
- Something within the namespace is not managed by Terraform (ex. deploying a JupyterHub with hubploy but not removing the hub before running
terraform destroy
) and actually prevents the namespace from being deleted. This isn't an issue that we can solve here. - The connection between the cluster and the local machine is just bad, so when I go back and run
kubectl get ns
, I see the namespace is actually gone and I can re-runterraform destroy
successfully. This seems like something we should look up solutions for or bring up with Terraform.