Skip to content

Install Terraform

Terraform is a command line tool that enables users to execute Terraform code. The tool allows users to validate their configuration, create, change, and destroy infrastructure based on code. For this lab, we will run Terraform locally but the actual execution will happen on the Terraform Enterprise box.

If you are on network, you may need to temporarily disconnect the VPN during the local setup steps for Git installation and SSH keys.

Install Terraform

You will need to install a command line interface if you do not have one already installed.

  1. Use the CLI tool Git Bash, or if you're more comfortable with Windows scripting, install Powershell.

  2. Then download Terraform 0.13.4 32-bit or download Terraform 0.13.4 64-bit and install using the binary.

  3. After the download, create a folder on your C:\ that will be the home to your Terraform executable (e.g. C:\terraform)

  4. Extract the zip file you downloaded and save it on the folder you created in the previous step.

  5. In the start menu type 'environment' and open the option that says 'Edit the System Environment Variables'

  6. In the new window, click on 'Environment Variables...' and under the 'System Variables' find the one called 'Path' and click edit.

  7. In the new window, click 'New' and add the folder path where you saved the terraform.exe (folder you created in previous step)

  8. Click OK on each menu that opened on this process. Make sure all the tabs are closed.

  9. Open a new CMD/PowerShell.

Use the built in Terminal which has bash already installed. We will use tfenv to manage the Terraform installation for us.

  1. Download tfenv
  2. Follow the instructions in the README to install
  3. Once installed, run tfenv install 0.13.4 && tfenv use 0.13.4

Confirm the installation worked by running terraform version.

Required Terraform Version

Terraform 0.14 won't work to run the next activities, make sure attendees have installed 0.13