Brew install terraform. Also known as: terraform@0.14. Tool to build, change, and version infrastructure. License: MPL-2.0. /api/formula/terraform.json (JSON API) Formula code on GitHub. Bottle (binary package) installation support provided for macOS releases: Intel. Homebrew-terraforms - Homebrew Casks for all Terraform versions This repository includes Homebrew Casks to install multiple (or even all!) Terraform versions at the same time. It also includes Homebrew Formula for chtf, a Terraform version switcher. To install Terraform, find the appropriate package for your system and download it as a zip archive. After downloading Terraform, unzip the package. Terraform runs as a single binary named terraform. Any other files in the package can be safely removed and Terraform will still function. Use asdf to switch terraform versions. Asdf-vm or asdf is a CLI tool that manages multiple language runtime versions on a per-project basis. It’s like gvm, nvm, rbenv, and pyenv and more. This post shows you how to install and configure multiple versions of terraform using asdf. I used brew on OSX to install asdf in a bash shell.
Use asdf
to switch terraform versions
asdf-vm
or asdf
is a CLI tool that manages multiple language runtime versions on a per-project basis. It’s like gvm
, nvm
, rbenv
, and pyenv
and more.
Purpose
This post shows you how to install and configure multiple versions of terraform using asdf
. I used brew on OSX to install asdf
in a bash shell. There are also instructions to install with git using linux bash, ZSH, and fish on Getting Started with asdf-vim.
Procedure
Install asdf with brew
Successful output includes
Test for a successful instal using the asdf version command
Successful output includes a version number like this
Configure your shell to use asdf using your .bash_profile
To test, cat your ~/.bash_profile and filter for asdf. You should see this output from the cat command
Test your ASDF_DIR and PATH is set properly env and filtering for asdf. You should see an ASDF_DIR
entry as well as a PATH entry that includes /.asdf/shims
Install dependencies for plugins
Successful output from brew includes a Summary
and a Pouring
for each dependency. This shows output for libxml
Now, we have asdf
installed and configured in our shell, and we’ll install the terraform plugin and manage between v.0.11 and v.0.12.
Install Terraform plugin for asdf
Successful output includes Cloning
from the reop and Unpacking
the objects
List versions of terraform
Successful output includes a list versions like this
We chose to install the latest version at the time of this writing, 0.12.5 as well as the latest version of terraform 0.11; which is 0.11.14
Install the latest v 0.11.x terraform using asdf
expected output includes
Install the latest v 0.12.x terraform using asdf
expected output includes
Set the global terraform version to 0.12.5
there is NO expected output from this command. test with the terraform --verison
command
expected output includes a terraform version number
Test the current version of terraform using asdf
expected output includes a terraform version
Install Terraform Mac
Switch to the older version of terraform using asdf
to set the global version pf asdf
expected output includes a terraform version number
Install Terraform
Test the current version of terraform using asdf
Homebrew Terraform
expected output includes a terraform version