Code Monkey home page Code Monkey logo

Comments (10)

taylorludwig avatar taylorludwig commented on September 1, 2024 1

The way it is now just setting destroy_cmd_body to something like "" would still break because it'll still attempt to just run gcloud at destroy time before the executable is there.

If you also set destroy_cmd_entrypoint = "" that should at least let terraform destroy finish. Obviously the iam-service-account would still be disabled for you since the enable on destroy wouldn't run.

from terraform-google-gcloud.

morgante avatar morgante commented on September 1, 2024

What platform are you using? And can you run terraform version?

from terraform-google-gcloud.

milesmatthias avatar milesmatthias commented on September 1, 2024

@chiokejjones could you try explicitly setting the version for this module to v0.2.0 and let us know if it was successful? There was a big change in v0.3.0 that shifted things around quite a bit.

from terraform-google-gcloud.

chiokejjones avatar chiokejjones commented on September 1, 2024

Hey fellas.

@morgante I'm using Terraform Enterprise running Terraform v0.12.18.

@milesmatthias I receive the same error when explicitly setting v0.2.0 or v0.1.0.

from terraform-google-gcloud.

morgante avatar morgante commented on September 1, 2024

@chiokejjones How about with v0.3.0? @taylorludwig Could your changes have caused this? Maybe we can test on Terraform Cloud.

from terraform-google-gcloud.

taylorludwig avatar taylorludwig commented on September 1, 2024

@morgante the command looks good. I see the PATH updated as expected with the new v0.3.0 changes.

I did notice in the output above the command is gcloud iam service-accounts enable projects/... but enable is the destroy_cmd_body

So it would make sense that it fails on destroy - the decompress and upgrade resources wouldn't have run on a fresh new vm/container (as terraform cloud would do) just to do a destroy so gcloud command wouldn't be there.

I believe it would have failed prior to v0.3.0 for the same reason.

@chiokejjones could you confirm if its failing on destroy and not apply?

I can setup a terraform cloud project to replicate

from terraform-google-gcloud.

taylorludwig avatar taylorludwig commented on September 1, 2024

I was able to replicate the same error on terraform cloud during a destroy.

apply worked as intended. I'll see if I can find a way to force the provision steps to happen on destroy for the setup gcloud resources.

from terraform-google-gcloud.

chiokejjones avatar chiokejjones commented on September 1, 2024

@morgante I received the same error on all three versions.

@taylorludwig It seems to force the destroy of the null_resources regardless if I'm making a change to the service account or not. I can try removing the destroy_cmd_body from the module logic.

from terraform-google-gcloud.

taylorludwig avatar taylorludwig commented on September 1, 2024

I was able to get create and destroy working with my PR here #11

@morgante seems a bit hacky and a lot of duplicate null_resource local-exec resources. But it does make sure that gcloud is decompressed and setup in the proper order during a destroy.

Output of my terraform cloud runs

apply.txt

destroy.txt

from terraform-google-gcloud.

chiokejjones avatar chiokejjones commented on September 1, 2024

The way it is now just setting destroy_cmd_body to something like "" would still break because it'll still attempt to just run gcloud at destroy time before the executable is there.

If you also set destroy_cmd_entrypoint = "" that should at least let terraform destroy finish. Obviously the iam-service-account would still be disabled for you since the enable on destroy wouldn't run.

@taylorludwig Thanks for the suggestion. Nulling those two parameters allowed the destroy to finish.

from terraform-google-gcloud.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.