DEV Community

Cover image for Step-by-step Guide to Installing Terraform on Windows
Annysah
Annysah

Posted on • Updated on

Step-by-step Guide to Installing Terraform on Windows

Installing a new software package on your PC can sometimes feel daunting. Trust me, I did feel this way when I was trying to install Terraform on my Windows PC. So, if you are new to Terraform and want it installed on your Windows PC, this guide will walk you through the process.

You can also check out my previous article on a brief introduction to Terraform

Step 1: Download Terraform

Image description

  • Select Windows under the "Operating Systems" section.

Image description

  • Click on "AMD64" to download Terraform binary for a 64-bit operating system (OS) or "386" for a 32-bit OS.

  • Navigate to your PC's Windows directory and create a new folder named terraform.

Image description

  • In your Downloads, right-click on the downloaded Terraform binary file and select "Extract All..." The window below will pop up.

Image description

  • Click on "Browse..." and navigate to the terraform folder created earlier. This is where you will extract the file. Once you are in the 'terraform' folder, click on "Extract."

Image description

Step 2: Set Terraform Path to System Environment Variables

  • In your Windows start menu, type environment and click "Edit system environment variables."

  • Click on "Environment Variables" in the System Properties window.

Image description

  • Under "System variables," select the "Path", then click "Edit."

Image description

  • Click "New" and enter the path of the Terraform folder, which is C:\terraform. Click "OK" to close each window.

Image description

Step 3: Verify Terraform Installation and Configuration

  • Navigate to the folder path C:\terraform in a new command prompt window and type the terraform -version to verify the installed version.

Image description

To see more Terraform commands, you can simply type terraform in the terminal.

Image description

Now, you have successfully installed and configured Terraform on your Windows PC. Cheers to more learning!

Top comments (0)