Installation

In this lesson, you'll learn how you can install Terraform.

We'll cover the following

Installation#

Visit the official Terraform download page and download the latest version for your target platform. Unzip the download to extract the Terraform binary. Terraform runs as a single binary, so all you need to do is move the binary into a folder that is in your path. The following varies slightly by platform:

Setup Terraform in the system

Mac OS/Linux#

  1. Open up a Terminal
  2. Go/Move into the downloads directory, normally by running cd ∼/Downloads
  3. Move the Terraform binary into /usr/local/bin by running mv ∼/Downloads/terraform /usr/local/bin/
  4. Test the installation by running terraform version. If the installation is successful, you should see something like Terraform v0.15.1

Windows#

  1. Move the unzipped Terraform binary into your desired folder such as c:\Terraform
  2. Search for View advanced system settings
  3. In the window that appears, click environment variables
  4. In the system variables section at the bottom find the path variable. Left-click it to select and then click edit
  5. In the edit system variable window, scroll to the end of the variable value box. Ensure that it ends in a ; then enter the path where you moved the Terraform binary into e.g. c:\Terraform

Click ok to close all of the windows you have opened

  1. Open up a Command prompt by pressing the Windows key, typing cmd, and pressing enter.
  2. Test the installation by running terraform version. If the installation is successful, you should see something like Terraform v0.15.1
Final Remarks
Setting up an AWS Account
Mark as Completed
Report an Issue