Terraform Archive Provider - Create ZIP and TAR Files
Use the Terraform archive provider to create ZIP files for Lambda functions, Cloud Functions, and deployments. archive_file data source with source_dir and...
Terraform
Install Terraform on Windows step by step. Covers manual install, Chocolatey, Scoop, and WSL methods plus PATH configuration and verification.
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.
terraform.exe to a permanent location (e.g., C:\terraform)Path and click EditC:\terraformOpen a new Command Prompt or PowerShell:
terraform version# 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# 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# Install via Windows Package Manager
winget install Hashicorp.Terraform
# Verify
terraform versionIf 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 versionterraform -install-autocomplete# 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-approveYou now have Terraform installed on Windows. Whether you chose manual installation, Chocolatey, Scoop, or WSL, you are ready to start building infrastructure as code.
Use the Terraform archive provider to create ZIP files for Lambda functions, Cloud Functions, and deployments. archive_file data source with source_dir and...
Automate Terraform with Azure DevOps Pipelines. YAML pipelines, service connections, environment approvals, and Azure backend state configuration.
Automate Terraform with GitHub Actions. Plan on PR, apply on merge, OIDC authentication, environment protection, and drift detection workflows.
Automate Terraform with GitLab CI/CD. Plan on merge requests, apply on main, remote state with HTTP backend, and environment-specific pipelines.