Install Terraform on Windows: Step-by-Step Guide
Terraform is a powerful Infrastructure as Code (IaC) tool used to manage cloud resources efficiently. In this guide, you’ll learn how to install Terraform on your Windows machine. Let’s get started!

✅ Step 1: Download Terraform
Visit the official Terraform website: Terraform Downloads
Select Windows and choose the appropriate version (typically
amd64
for most users).Click Download and save the file.
📥 Once the download completes, proceed to the next step.
📦 Step 2: Extract the Terraform Files
Locate the downloaded
.zip
file.Use a tool like WinRAR, 7-Zip, or Windows Extractor to extract the contents.
You will find a single file named
terraform.exe
.
💡 Tip: Create a dedicated folder like C:\terraform
and move terraform.exe
there.


⚙️ Step 3: Add Terraform to System Path
To run Terraform from any command prompt, add it to your system’s Path
variable.
Search for
Environment Variables
from the Start Menu.Click on Edit the system environment variables → Environment Variables.
Under System Variables, locate the variable named Path and click Edit.
Click New and enter the path where you placed
terraform.exe
(e.g.,C:\terraform
).Click OK to save the changes.
🧑💻 With this done, Terraform is now accessible from your terminal.
🧪 Step 4: Verify Installation
Now it’s time to check if Terraform is installed correctly.
Open Command Prompt or PowerShell.
Run the following command:
terraform version
You should see the installed Terraform version displayed.
🎉 Congratulations! Terraform is successfully installed.

🚀 Bonus: Install Using Chocolatey (Optional)
If you have Chocolatey installed, you can install Terraform with one command:
choco install terraform
This method is faster and automatically adds Terraform to your system path.
🙌 Next Steps
Now that you have Terraform installed, you can start building and managing cloud infrastructure. Try running:
terraform init
🏁 Run Your First Terraform Script
Here is a simple example to create two AWS EC2 instances using Terraform.
1.Create a new directory and navigate to it:
mkdir terraform-aws-demo
cd terraform-aws-demo
2.Create a file named main.tf and add the following content:
provider “aws” {
region = “us-east-1”
access_key = “YOUR_ACCESS_KEY”
secret_key = “YOUR_SECRET_KEY”
}
resource “aws_instance” “myfirstVM” {
count = 2
ami = “ami-08b5b3a93ed654d19”
instance_type = “t2.micro”
key_name = “terraformserverkey”
tags = {
Name = “linuxserver”
}
}
⚠️ Ensure your access and secret keys are correct. Never share your keys publicly.
3.Initialize and apply the configuration:
terraform init
terraform apply
4 .Confirm with yes when prompted.
✅ Your AWS EC2 instances will be created shortly. Congratulations on running your first Terraform script!
💬 Need help? Drop your questions in the comments!
DevOps with AWS Training
Take your DevOps skills to the next level with our AWS training! Gain hands-on experience, real-world project exposure, and industry-recognized expertise. Enroll today and step into a high-demand career