Skip to content
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

ASM Module Fails to destroy #604

Closed
PsychoSid opened this issue Jul 16, 2020 · 2 comments · Fixed by #602
Closed

ASM Module Fails to destroy #604

PsychoSid opened this issue Jul 16, 2020 · 2 comments · Fixed by #602
Assignees

Comments

@PsychoSid
Copy link

Hi,

When trying to destroy a GKE cluster setup with ASM the destroy will fail with:-

Error: Error running command 'PATH=<mypath>/.terraform/modules/asm.asm_install/terraform-google-gcloud-1.1.1/cache/94f77b98/google-cloud-sdk/bin:$PATH
.terraform/modules/asm/terraform-google-kubernetes-engine-10.0.0/modules/asm/scripts/kubectl_wrapper.sh https://<IP> <token-removed> kubectl delete ns istio-system
': exit status 1. Output:   -Dd, --decode   decodes input
W0716 13:55:11.407977   22416 loader.go:223] Config not found: /tmp/kubectl_wrapper_9336_20830/config
W0716 13:55:11.408498   22416 loader.go:223] Config not found: /tmp/kubectl_wrapper_9336_20830/config
error: You must be logged in to the server (the server has asked for the client to provide credentials)

I know I am logged in locally and can access the k8s API / gCloud etc.

This leaves the terraform state in a bad way and I have to manually delete the resources and the state file.

Any ideas ?

Thanks

@morgante
Copy link
Contributor

@bharathkkb PTAL

@bharathkkb bharathkkb self-assigned this Jul 16, 2020
@bharathkkb
Copy link
Member

@PsychoSid I believe this is happening due to the destroy_cmd_body caching the old data.google_client_config.default.access_token. I have set up a cluster to test for reproduction and will update here.
Additionally, I will be trying out this approach which should eliminate this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants