This document provides Windows-specific guidance for the Terraform workshop.
Recommended: Using Chocolatey
# Install Chocolatey if needed (run as Administrator)
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
# Install workshop tools
choco install terraform
choco install gcloudsdk
choco install gitAlternative: Follow official guides at Terraform Install and Google Cloud SDK Install
- Go to Google Cloud Console and log in with your Google account.
- Note the project ID you'll be using for the workshop.
In PowerShell or Command Prompt:
# Log in to Google Cloud
gcloud auth login
# Set the workshop project (if not prompted during login)
gcloud config set project cloud-labs-workshop-42clws
# Set up application default credentials for Terraform
gcloud auth application-default login
# Verify your setup
gcloud config listRun the setup verification script:
.\verify-setup.ps1This script will check that you have all required tools installed and properly configured.
PowerShell (recommended) is the modern Windows shell and works great for the workshop. You can also use Command Prompt or Git Bash if you prefer.
If you're new to PowerShell:
- Use Tab for auto-completion
- Use ↑/↓ arrows for command history
- Right-click to paste
- Use
clsto clear screen
Common Issues and Solutions:
-
"terraform: command not found": Ensure Terraform is in your PATH. Restart your terminal after installation.
-
"gcloud: command not found": Ensure Google Cloud SDK is in your PATH. You may need to restart your terminal or reinstall the SDK.
-
"gcloud auth list shows no accounts": Run
gcloud auth loginto authenticate. -
"Permission denied" when accessing project: Ensure you have the necessary IAM roles in the project. Contact workshop facilitators if using the provided project.
-
"Application Default Credentials not found": Run
gcloud auth application-default loginto set up credentials for Terraform. -
Terraform provider errors: Make sure you're in the
infra/directory and have runterraform init.
If you get execution policy errors:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserIf commands aren't found after installation:
- Restart your terminal
- Check PATH:
echo $env:PATH(PowerShell) - Reinstall tools if needed
Visual Studio Code is recommended for the workshop:
# Install VS Code via Chocolatey
choco install vscode
# Install Terraform extension
code --install-extension HashiCorp.terraformTerraform-specific plugins are available for: (Neo)Vim, IntelliJ IDEA and more.
# Navigation and files
cd infra # Change directory
ls # List files (or dir)
notepad filename.tf # Edit with Notepad
code filename.tf # Edit with VS Code
# System information
Get-ComputerInfo # System detailsterraform --help
gcloud --help
Get-Help # PowerShell help systemIf you encounter Windows-specific issues during the workshop, try the solutions above or ask workshop facilitators for help.