Tfswitch Terraform Version Management¶
Tfswitch (also known as terraform-switcher) is a command-line tool used to install and manage multiple versions of the Terraform CLI. It allows developers to quickly switch between different Terraform binaries on their local machine to match specific project requirements^[README.md].
Installation¶
tfswitch can be installed on macOS using Homebrew by tapping the warrensbox/tap repository^[README.md]. For Linux systems, the installation is typically performed by downloading and executing the official installation script provided by the terraform-switcher project^[README.md].
Usage¶
Once installed, tfswitch allows users to view a list of available Terraform versions and select the one they wish to use^[README.md]. Running tfswitch with the list flag displays an interactive menu where versions can be selected using arrow keys^[README.md].
After a version is selected, tfswitch configures the environment so that the terraform command defaults to the chosen binary^[README.md]. Users can verify the active version by running terraform -v^[README.md].
Sources¶
^[README.md]