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

0-bootstrap terraform destroy fails on Mac #44

Closed
smathalikunnel opened this issue Jun 2, 2020 · 4 comments
Closed

0-bootstrap terraform destroy fails on Mac #44

smathalikunnel opened this issue Jun 2, 2020 · 4 comments

Comments

@smathalikunnel
Copy link

I get the following error while performing terraform destroy on 0-bootstrap. The cache folder with random id is not getting created (instead there are folders named 'darwin' and 'linux'), causing the provisioner to fail

module.cloudbuild_bootstrap.module.cloudbuild_project.module.project-factory.module.gcloud_disable.null_resource.upgrade_destroy[0]: Destruction complete after 31s
module.cloudbuild_bootstrap.module.cloudbuild_project.module.project-factory.module.gcloud_disable.random_id.cache: Destroying... [id=qTXcPw]
module.cloudbuild_bootstrap.module.cloudbuild_project.module.project-factory.module.gcloud_disable.random_id.cache: Destruction complete after 0s

Error: Error running command 'tar -xzf .terraform/modules/seed_bootstrap.seed_project.project-factory.gcloud_disable/terraform-google-gcloud-0.5.1/cache/18d111ef/google-cloud-sdk.tar.gz -C .terraform/modules/seed_bootstrap.seed_project.project-factory.gcloud_disable/terraform-google-gcloud-0.5.1/cache/18d111ef && cp .terraform/modules/seed_bootstrap.seed_project.project-factory.gcloud_disable/terraform-google-gcloud-0.5.1/cache/18d111ef/jq .terraform/modules/seed_bootstrap.seed_project.project-factory.gcloud_disable/terraform-google-gcloud-0.5.1/cache/18d111ef/google-cloud-sdk/bin/': exit status 1. Output: tar: Error opening archive: Failed to open ###'.terraform/modules/seed_bootstrap.seed_project.project-factory.gcloud_disable/terraform-google-gcloud-0.5.1/cache/18d111ef/google-cloud-sdk.tar.gz'

It might be linked to the following issue?
terraform-google-modules/terraform-google-gcloud#26

@rjerrems
Copy link
Collaborator

rjerrems commented Jun 3, 2020

Hi @smathalikunnel - can you confirm the version of terraform you are using? It does seem to be related to the same issue linked there, we will likely remove provide an option in a future version to use local gcloud instead for the bootstrap module as well.

@smathalikunnel
Copy link
Author

hi @rjerrems terraform version is v0.12.25.

Not sure I understand your statement "remove provide an option in a future version to use local gcloud instead for the bootstrap module as well"

Are you referring to using gcloud directly instead of local-exec provider? That would be a welcome change indeed :)

@rjerrems
Copy link
Collaborator

rjerrems commented Jun 3, 2020

Yeah the project factory actually supports that as an option, which we need to add support for in the bootstrap module https://github.com/terraform-google-modules/terraform-google-bootstrap

We can leave this open to track that work and perhaps a good prompt for potentially supporting that option for the projects created in this repo. @morgante FYI

@bharathkkb
Copy link
Member

@smathalikunnel this feature will be tracked via #61, hence closing this out. We will surface an option called skip_gcloud_download which when enabled will use local gcloud.

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

No branches or pull requests

3 participants