Peter Walker
Peter's SRE Notes

Peter's SRE Notes

Installing Terraform on Windows

Hint: Use Linux commands 😊

Peter Walker's photo
Peter Walker
·Jul 22, 2021·

1 min read

Like the subtitle suggests, doing things on the Linux CLI seems to always be easier than dealing with Windows, but at least Git Bash is on Windows. Installing Terraform on Linux (assuming you have the HashiCorp Linux repo):

sudo apt-get update && sudo apt-get install terraform

An easy way to get it usable on Windows is to well, use Linux commands ¯_(ツ)_/¯

  1. Download the latest Windows version (as of 7/21/21) -

  2. Open Git Bash

  3. Extract the zip and move the .exe to a location you like.

    unzip terraform*.exe
    mv terraform.exe /c/path_to_exe/
  4. Update your .bash_profile path

    export PATH="$PATH:/c/path_to_exe"
  5. Validate you can use the terraform command

    terraform --version
Share this