Switching between multiple Terraform versions
In the previous recipes, we learned how to install one specific version of Terraform manually or by script.
In some scenarios, we need to have different Terraform versions installed on the same workstation:
- When we work on multiple Terraform configuration projects, it’s often required to have different versions of Terraform binary used by each of these projects
- When we want to test new versions of the Terraform binary
All previously described methods of installation only allow us to use one Terraform version at a time.
To solve this problem, we have different solutions:
- To rename the Terraform binary by including the Terraform version at the end of the binary. For example, for Terraform version 1.0.5, download the corresponding binary and extract it as shown in the Downloading and installing Terraform on Windows manually recipe. Rename the target file
terraform1.0.5.exe
. Then run all...