Table of Contents
Introduction
Installing Terraform on Windows is straightforward with several methods available. This guide covers every approach — from manual download to package managers — so you can choose what works best for your workflow.
Method 1 - Manual Download (Recommended for Beginners)
Step 1 - Download Terraform
- Visit terraform.io/downloads
- Download the Windows AMD64 zip file
- Extract the zip file
Step 2 - Add to PATH
- Extract
terraform.exeto a permanent location (e.g.,C:\terraform) - Open System Properties > Environment Variables
- Under System Variables, find
Pathand click Edit - Click New and add
C:\terraform - Click OK to save
Step 3 - Verify
Open a new Command Prompt or PowerShell:
terraform version
Method 2 - Chocolatey
# Install Chocolatey (if not installed)
Set-ExecutionPolicy Bypass -Scope Process -Force
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
# Install Terraform
choco install terraform
# Verify
terraform version
# Update later
choco upgrade terraform
Method 3 - Scoop
# Install Scoop (if not installed)
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
irm get.scoop.sh | iex
# Install Terraform
scoop install terraform
# Verify
terraform version
# Update later
scoop update terraform
Method 4 - winget
# Install via Windows Package Manager
winget install Hashicorp.Terraform
# Verify
terraform version
Method 5 - WSL (Windows Subsystem for Linux)
If you prefer a Linux environment on Windows:
# In WSL Ubuntu
sudo apt-get update
sudo apt-get install -y gnupg software-properties-common
wget -O- https://apt.releases.hashicorp.com/gpg | \
gpg --dearmor | \
sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \
https://apt.releases.hashicorp.com $(lsb_release -cs) main" | \
sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt-get update
sudo apt-get install terraform
terraform version
Enable Autocomplete (PowerShell)
terraform -install-autocomplete
IDE Setup
VS Code Extension
- Open VS Code
- Install “HashiCorp Terraform” extension
- Enjoy syntax highlighting and autocomplete
Verify Installation
# Check version
terraform version
# Test with a simple config
mkdir test-terraform
cd test-terraform
# Create main.tf
@"
terraform {
required_providers {
local = {
source = "hashicorp/local"
}
}
}
resource "local_file" "hello" {
content = "Hello, Terraform on Windows!"
filename = "hello.txt"
}
"@ | Out-File -FilePath main.tf -Encoding UTF8
terraform init
terraform apply -auto-approve
Get-Content hello.txt
terraform destroy -auto-approve
Hands-On Courses
Conclusion
You now have Terraform installed on Windows. Whether you chose manual installation, Chocolatey, Scoop, or WSL, you are ready to start building infrastructure as code.

