DEV Community

How to Install and Set Up Terraform on Windows (Step-by-Step Guide)

Terraform is a powerful Infrastructure as Code (IaC) tool that allows efficient management of cloud resources. This guide covers installing Terraform on Windows, configuring environment variables, verifying the installation, and creating a simple main.tf file in VS Code. To start, download Terraform from the official website and select the 64-bit version. Unzip the downloaded file and rename the extracted folder to "terraform". Move the terraform folder to the Local Disk C to ensure system-wide accessibility. Add Terraform to the system's PATH by editing the Environment Variables. Verify the installation by running the "terraform -v" command in Command Prompt. Create a new folder for your Terraform project in VS Code and add a new file named main.tf. In the main.tf file, add a sample Terraform configuration for AzureRM provider. After completing these steps, you have successfully installed Terraform on Windows and created your first Terraform configuration file. You are now ready to start deploying infrastructure using Terraform.
favicon
dev.to
dev.to
Image for the article: How to Install and Set Up Terraform on Windows (Step-by-Step Guide)