blast-radius icon indicating copy to clipboard operation
blast-radius copied to clipboard

Upgrade to terraform 0.12.24

Open ltomes opened this issue 5 years ago • 7 comments

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.

ltomes avatar May 09 '20 22:05 ltomes

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 ?

MacFlurry avatar May 09 '20 22:05 MacFlurry

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.

ltomes avatar May 09 '20 22:05 ltomes

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 ?

MacFlurry avatar May 09 '20 22:05 MacFlurry

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

28mm avatar May 10 '20 14:05 28mm

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.

ltomes avatar May 13 '20 15:05 ltomes

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.

neil-wwt avatar Jun 09 '20 16:06 neil-wwt

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

RolfMoleman avatar Mar 28 '24 13:03 RolfMoleman