terraform-deploy icon indicating copy to clipboard operation
terraform-deploy copied to clipboard

Terraform Problems

Open salvis2 opened this issue 5 years ago • 0 comments

When terraform destroying, 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:

  1. 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.
  2. 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-run terraform destroy successfully. This seems like something we should look up solutions for or bring up with Terraform.

salvis2 avatar Feb 12 '20 18:02 salvis2