Terraform is popular Infrastructure automation tool. You can easily provision EC2 instances or create any resources on AWS or any cloud platform. Here are the steps for setting up Terraform on Windows machine.
1. Go to https://www.terraform.io/downloads.html
2. Download windows 64-bit zip - https://releases.hashicorp.com/terraform/0.13.3/terraform_0.13.3_windows_amd64.zip
3. once downloaded, extract the zip file to downloads directory
4. rename the extracted folder to terraform
Setup path of Terraform
Open windows explorer, click on PC, click on properties.
Choose right click on properties, Click on Advanced system settings.
Click on environment variables
Click on Path --> Edit
Add path of directory where you extracted terraform.
C:Users<user_name>Downloadsterraform
Click on OK, OK, Apply Save.
Now open git bash, type
terraform -version
Terraform v0.13.3
- Terraform v0.12 includes a new command terraform 0.12upgrade that will read the configuration files for a module written for Terraform 0.11 and update them in-place to use the cleaner Terraform 0.12 syntax and also adjust for use of features that have changed behavior in the 0.12 Terraform language.
- Mac/Ubuntu users: Edit.zshrc file. Thanks to Warrenbox, there is a neat tool that allows you to download and swap versions of terraform all from command line and without any additional setup.
- To install Terraform, find the appropriate package for your system and download it. After downloading, unzip the package. Terraform runs as a single binary named terraform. Any other files in the package can be safely removed and Terraform will still function.
Go to the Releases Page. Downloading the binary for your operating system: e.g., if you’re on a Mac, download terragruntdarwinamd64; if you’re on Windows, download terragruntwindowsamd64.exe, etc. Rename the downloaded file to terragrunt. Add execute permissions to the binary.
1. Go to https://www.terraform.io/downloads.html
2. Download windows 64-bit zip - https://releases.hashicorp.com/terraform/0.13.3/terraform_0.13.3_windows_amd64.zip
3. once downloaded, extract the zip file to downloads directory
4. rename the extracted folder to terraform
Setup path of Terraform
Open windows explorer, click on PC, click on properties.
Choose right click on properties, Click on Advanced system settings.
Click on environment variables
Click on Path --> Edit
Add path of directory where you extracted terraform.
C:Users<user_name>Downloadsterraform
Terraform Downloads
Verify Terraform installation
Now open git bash, type
terraform -version
Download Terraform 0.12
Terraform v0.13.3