Reputation: 597
A colleague developed a terraform script that used version 0.14.x of Terraform. He uses a local Cloud Shell while I use the Cloud Shell in the GCP console.
The GCP console reports the terraform version as being 0.12.x.
How do you update the version to the latest? I tried following the Debian instructions from the Hashicorp web site and now, if I try to follow them again, I am told I have version 0.14.x installed but if I type terraform --version I still see 0.12.x.
What am I missing?
Upvotes: 1
Views: 2877
Reputation: 30120
You can switch between versions of TF by typing the command tfswitch on your terminal.
or else what you can is to remove the old version from path
you can get the current version path from which terraform
you can remove the old release from the old path and add the binary to same place in GCP Cloud CLI.
You can directly download the zip into GCP cloud CLI using :
wget https://releases.hashicorp.com/terraform/0.14.7/terraform_0.14.7_linux_amd64.zip
unzip and set the binary at the same path
Upvotes: 2