I have installed a version (0.12.24) of Terraform which is later than the required version (0.12.17) specified in our configuration. How can I downgrade to that earlier version? My system is Linux Ubuntu 18.04.
There are certain scenarios in which it becomes necessary to downgrade the version of the Terraform command line tool used by Terraform Cloud or Terraform Enterprise (TFC/E). In workspaces that have already run on a higher version, you must manually modify the state file to allow for downgrading.
You can switch between different versions of terraform by typing the command tfswitch on your terminal. Select the version of terraform you require by using the up and down arrow. Hit Enter to select the desired version.
Run the UninstallerDownload the uninstaller: Run curl https://install.terraform.io/tfe/uninstall > uninstall.sh . Make the script executable: Run chmod +x uninstall.sh . Execute the uninstaller: Run sudo bash uninstall.sh to execute the script.
As long as you are in linux, do the following in the terminal:
rm -r $(which terraform)
Install the previous version:
wget https://releases.hashicorp.com/terraform/1.1.7/terraform_1.1.7_linux_amd64.zip
unzip terraform_1.1.7_linux_amd64.zip
mv terraform /usr/local/bin/terraform
terraform --version
That's it, my friend.
EDIT: I've assumed people now use v1.1.8 so the previous version is v1.1.7.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With