TerraformPilot

DevOps

Terraform on Windows 11: Developer Workstation Setup

Install and use Terraform on a Windows 11 developer workstation: winget install, WSL2 alternative, AWS/Azure CLI integration, and VS Code setup.

LLuca Berton1 min read

Windows 11 remains the dominant enterprise desktop in 2026. Setting up a productive Terraform workstation on Windows 11 is straightforward: winget install Hashicorp.Terraform, then layer on AWS CLI, Azure CLI, and VS Code with the HashiCorp Terraform extension.

Quick Setup (TL;DR)

#
winget install --id Hashicorp.Terraform -e
winget install --id Amazon.AWSCLI -e
winget install --id Microsoft.AzureCLI -e
winget install --id Microsoft.VisualStudioCode -e
terraform --version

Native PowerShell vs WSL2

#
ApproachProsUse when
Native (winget)No Linux dependency, integrates with Windows IAMSolo dev, Windows-only stack
WSL2 UbuntuIdentical to Linux CI, Bash toolingTeam CI parity, scripting in Bash

For team consistency, WSL2 wins — your terraform plan runs the same on laptop and CI. See Install Terraform on Windows WSL2.

Pin Terraform Version with tfenv on WSL2

#
sudo apt-get install -y git
git clone https://github.com/tfutils/tfenv ~/.tfenv
echo 'export PATH="$HOME/.tfenv/bin:$PATH"' >> ~/.bashrc
tfenv install 1.10.4
tfenv use 1.10.4

VS Code Configuration

#

Add to .vscode/settings.json in your repo:

{
  "terraform.languageServer.enable": true,
  "[terraform]": { "editor.defaultFormatter": "hashicorp.terraform" },
  "[terraform-vars]": { "editor.defaultFormatter": "hashicorp.terraform" },
  "editor.formatOnSave": true
}

Authenticate to AWS / Azure

#
aws configure sso          # SSO is the 2026 default
az login --use-device-code

Best Practices

#
  • Use SSO, not long-lived access keys, on a developer Windows 11 box.
  • Keep state in remote backend (S3 + DynamoDB or Terraform Cloud). Never commit terraform.tfstate.
  • WSL2 for parity — symlink your repo into /home/<you>/ (not /mnt/c/) for performance.
  • Enable Windows Hello + BitLocker before storing cloud credentials.
#
#Terraform#Windows 11#winget#WSL2#Developer Setup

Share this article