Upgrade terraform to specific version
For anyone looking to do the same without using homebrew:
- Get source
$ wget https://releases.hashicorp.com/terraform/0.11.14/terraform_0.11.14_linux_amd64.zip
$ unzip terraform_0.11.14_linux_amd64.zip
- Give binary executable permissions and install (will overwrite current version)
$ chmod +x terraform
$ sudo mv terraform /usr/local/bin/
- Confirm version
$ terraform --version
Source: https://titosoft.github.io/kvm/terraform-and-kvm/#installing-terraform
Especially when playing around with Terraform 0.12 betas, I learned to love tfenv.
After installation (via brew install tfenv
on MacOS), this allows you to easily discover, install and activate any Terraform version:
$ tfenv list-remote
0.12.0
0.12.0-rc1
0.12.0-beta2
0.12.0-beta1
0.12.0
0.11.14
...
$ tfenv install 0.11.14
[INFO] Installing Terraform v0.11.14
[INFO] Downloading release tarball from https://releases.hashicorp.com/terraform/0.11.14/terraform_0.11.14_darwin_amd64.zip
...
[INFO] Installation of terraform v0.11.14 successful
[INFO] Switching to v0.11.14
[INFO] Switching completed
If you want to switch to a different version:
$ tfenv use 0.12.0
[INFO] Switching to v0.12.0
[INFO] Switching completed