Skip to content

TFswitch

image

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

image

  1. You can switch between different versions of terraform by typing the command tfswitch on your terminal.

  2. Select the version of terraform you require by using the up and down arrow.

  3. Hit Enter to select the desired version.

Supply version on command line

image

  1. You can also supply the desired version as an argument on the command line.

  2. For example, tfswitch 0.10.5 for version 0.10.5 of terraform.

  3. Hit Enter to switch.

See all versions including beta, alpha and release candidates

image

  1. Display all versions including beta, alpha and release candidates(rc).

  2. For example, tfswitch -l or tfswitch --list-all to see all versions.

  3. Hit Enter to select the desired version.