Skip to content

Installing Terraform

Tracy P Holmes edited this page Mar 22, 2019 · 3 revisions

Windows

This guide has been tested on Windows 10

  1. Download and install Terraform Windows 64-bit.
  2. Unarchive the downloaded zip file (you should be able to do this by double-clicking it).
  3. Navigate to C:\, and create a terraform folder. Change into your Terraform directory (C:\terraform), and copy the files from the downloaded zip into it.
  4. Open the command prompt as an administrator, and set the PATH to use terraform binaries. You can do this by using the following command: set PATH=%PATH%;C:\terraform
  5. An easy way to verify your install is to check your Terraform version. You do this by with terraform -v.
        terraform -v
        Terraform v0.11.13
  1. Now you can check out a list of common commands by running terraform!

macOS

This guide has been tested on macOS Sierra (10.12) and above

If you want to install/setup Terraform on macOS Sierra system, there are a couple of ways to go about it.

Option 1: Homebrew

The first optional way is to use HomeBrew. This option simplifies the install process, and updating is also a breeze if you go this route.

If you don't already have Homebrew installed, let's get that done. Follow the instructions linked here: How to Install Homebrew.

Once that's done, you can install Terraform. Enter this command into your terminal

brew install terraform. You should get something like this:

    brew install terraform
    ==> Downloading https://homebrew.bintray.com/bottles/terraform-0.11.13.mojave.bottle.tar.gz
    ######################################################################## 100.0%
    ==> Pouring terraform-0.11.13.mojave.bottle.tar.gz
    🍺  /usr/local/Cellar/terraform/0.11.13: 6 files, 120.6MB

Note: Homebrew uses something called a "symlink". For Terraform, a symlink will be created for the binary /usr/local/bin/terraform over at → /usr/local/Cellar/terraform/0.11.13.

Upgrading

When it's time to upgrade, simply enter brew upgrade terraform into your terminal.

Option 2: Manual Install

HomeBrew typically stays updated with the latest releases. However, if you need to manually setup Terraform, this is how you can do it.

  1. Download and install Terraform macOS 64-bit.
  2. Unarchive the downloaded zip file (you should be able to do this by double-clicking it).
  3. Copy binary to a place in the path such as /usr/local/bin/terraform. You can do this with the following command:
        cp $HOME/Downloads/terraform /usr/local/bin/
  1. An easy way to verify your install is to check your Terraform version. You do this by with terraform -v.
        terraform -v
        Terraform v0.11.13
*Note: If your system does not recognize `Terraform` as a command, you may need to add it to your `$PATH`. To do that, follow [these](https://stackoverflow.com/a/14638025) instructions.*
  1. Now you can check out a list of common commands by running terraform!

    macOS Terraform Command Screenshot

Clone this wiki locally