Introduction

Today we're going to be installing Terraform on MacOS Sierra 10.12.6, but this should be applicable to any MacOS version.

What is Terraform?

Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. Terraform can manage existing and popular service providers as well as custom in-house solutions. Configuration files describe to Terraform the components needed to run a single application or your entire datacenter.

Manual Way

Download the binary zip from HashiCorp

https://www.terraform.io/downloads.html

Unzip

unzip $HOME/Downloads/terraform*

Copy the binary to a place in the path such as /usr/local/bin/terraform

cp $HOME/Downloads/terraform /usr/local/bin/

Verify Install

terraform -v

You should see the output below, if so good job.

Terraform v0.10.4

Easy Way

The easiest and quickest way to install Terraform is using Homebrew. This article assumes you have Homebrew installed, if not please search google for how to install Homebrew and come back.

$ brew install terraform

==> Downloading https://homebrew.bintray.com/bottles/terraform-0.9.1.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring terraform-0.9.1.sierra.bottle.tar.gz
==> Caveats
zsh completion has been installed to:
/usr/local/share/zsh/site-functions
==> Summary
🍺 /usr/local/Cellar/terraform/0.9.1: 7 files, 131.6MB

If you have any issues be sure to let me know!