TFswitch
The tfswitch command line tool lets you switch between different versions of terraform.
It is so useful when you are working on different projects and need to switch between different terraform versions.
Now you forget about downloading/updating terraform versions manually.
How to install
Brew
brew install warrensbox/tap/tfswitch
Linux
curl -L https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh | bash
From source
You can also install this tool manually from the GitHub
How to use
Use dropdown menu to select version
-
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.
Supply version on command line
-
You can also supply the desired version as an argument on the command line.
-
For example, tfswitch 0.10.5 for version 0.10.5 of terraform.
-
Hit Enter to switch.
See all versions including beta, alpha and release candidates
-
Display all versions including beta, alpha and release candidates(rc).
-
For example, tfswitch -l or tfswitch --list-all to see all versions.
-
Hit Enter to select the desired version.