28mm / blast-radius

Interactive visualizations of Terraform dependency graphs using d3.js
https://28mm.github.io/blast-radius-docs/
MIT License
2.03k stars 256 forks source link

Upgrade to terraform 0.12.24 #77

Open ltomes opened 4 years ago

ltomes commented 4 years ago

Upgrade to terraform 0.12.24

I run into state errors using latest terraform with blast radius, so I updated the tf version.

It appears circleci is not happy with the configuration change I provided. I don't think there is anything I can do to resolve that issue though, @28mm will have to clear the docker cache I believe to resolve that.

MacFlurry commented 4 years ago

Is it possible to specify only a major.minor and non major.minor.patch version? Ex: TF_VERSION = 0.12 instead of TF_VERSION = 0.12.x. the fact of setting the patch versions means that each time HashiCorp updates the patch version, you'll have to regularly modify blast-radius to make it match with the right Terraform version. If only the major.minor versions are kept, the lifetime will be longer.

What do you think about ?

ltomes commented 4 years ago

There is not a low effort way at least. Terraform Does not have a latest convention for docker or releases. Here a reply directly from tf on this: https://github.com/hashicorp/terraform/issues/9803#issuecomment-257903082

Docker: https://hub.docker.com/r/hashicorp/terraform A quick way to test this is:

Error response from daemon: manifest for hashicorp/terraform:0.12 not found: manifest unknown: manifest unknown
0.12.24: Pulling from hashicorp/terraform
c9b1b535fdd9: Pull complete
011000b168e5: Pull complete
4c096b23c4a8: Pull complete
Digest: sha256:53fb1c0a78c8bb91c4a855c1b352ea7928f6fa65f8080dc7a845e240dd2a9bee
Status: Downloaded newer image for hashicorp/terraform:0.12.24
docker.io/hashicorp/terraform:0.12.24

~I think a shell script could be written to curl https://releases.hashicorp.com/terraform/, and pull the latest patch version/automate the pr processes to update terraform in blast-radius;~ Actually it looks like you can get the latest version here: https://checkpoint-api.hashicorp.com/v1/check/terraform At any rate I think that's the type of change @28mm should be involved in, I'm at the very fringes of this repo, and the convention of auto upgrading users on patch version seems like it's against terraforms intention.

MacFlurry commented 4 years ago

thanks @ltomes . So @28mm , something like proposed by HashiCorp team like:

curl -s https://checkpoint-api.hashicorp.com/v1/check/terraform | jq -r -M '.current_version' Result:

0.12.24

and have it dynamically in dockerfile could be like:

RUN curl -s https://checkpoint-api.hashicorp.com/v1/check/terraform | jq -r -M '.current_version' > /root/tmp_tf_version
RUN TF_VERSION=$(cat /root/tmp_tf_version)

Not tested it :-) @28mm ?

28mm commented 4 years ago

@ltomes @MacFlurry thank you. afk -- will try this tonight.

ltomes commented 4 years ago

I think we could merge the 0.12.24 update, and start a new branch for automated version setting if thats what you would like to see in the future.

neil-wwt commented 4 years ago

Just ran into this error as well when running the container. I'm going to rebuild the image locally with the latest version, but would be really like to see this fixed. Also happy to help if there is any testing or anything else I can do.

RolfMoleman commented 3 months ago

did we get any movement on this? as the current terraform version supported is drastically out of date