Install Terraform

In my previous article, we discussed what is terraform and why we need terraform. Today, we discuss the steps to install Terraform.

 

1. Go to Install | Terraform | HashiCorp Developer and select the Windows tab. Download the AMD64 zip file.

 

A screenshot of a computer

Description automatically generated

 

2. Go to C: drive and create a Terraform folder. Unzip the file downloaded in the previous step and copy the terraform.exe file to the C:\Terraform folder.

 

A screenshot of a computer

Description automatically generated

 

3. Open File Explorer, right-click on “This PC” and select Properties.

 

A screenshot of a computer

Description automatically generated

 

4. Go to Advanced settings

 

A screenshot of a computer program

Description automatically generated

5. Select Environment variables.

 

A screenshot of a computer

Description automatically generated

6. Add Terraform path C:\Terraform\ to either User Variables or System Variables “Path” variables. Select the “Path” variable and click on Edit. Once you open the Edit environment variable screen, add the terraform path C:\Terraform\ and click the OK button for all screens.

 

A screenshot of a computer

Description automatically generated

 

7. Restart your PC

 

8. To validate the Terraform installation, open Visual Studio Code, which we will use for Terraform development and execute the “Terraform --Version" command to check the Terraform version. If you don’t have Microsoft Visual Studio Code, download it from Download Visual Studio Code - Mac, Linux, Windows and install.

 

A screenshot of a computer

Description automatically generated