This document simply describes setup of the utility tfenv on a MacBook / Mac OS with very brief usage examples.
Install pre-requisite – HomeBrew
brew unlink terraform
yes you have to unlink terraform prior to installing this beast!
Installation:
brew install tfenv
BTW I never did the opposite of the unlink (brew link terraform) as then it wanted me to unlink tfenv… and that felt stupid…
Yes it was that simple, now on to a few very simple usage examples.
tfenv install 0.12.31
Terraform v0.12.31 is already installed
tfenv use 0.12.31
Switching default version to v0.12.31
Switching completed
tfenv list
* 0.12.31 (set by /usr/local/Cellar/tfenv/2.2.3/version)
terraform --version
Terraform v0.12.31
Your version of Terraform is out of date! The latest version
is 1.2.2. You can update by downloading from https://www.terraform.io/downloads.html