Installing Terraform on Windows

If you are installing Terraform on Windows, you can follow these steps to ensure a successful installation:

Step 1: Download the Installation File

  1. Navigate to the Terraform download page at https://www.terraform.io/downloads.html.

  2. Look for the Windows section and download the (AMD64)version of Terraform. For example, you can download version 1.4.2 or Latest verasion. show in below fig.

Download Terraform for Windows
  1. It will download a zip file. Unzip the file to extract the .exe file. Copy to C drive, such as C:/terraform_1.4.2_windows_amd64.exe

exe terraform

Step 2: Update the Path Environment Variable

  1. Open the Start menu and search for "Environment variables".

  2. Open the "Environment variables" settings page.

Open Environment Variables

3.In the "Environment Variables" window, locate the "Path" variable under the "System variables" section and click "New".

Edit Environment Variable path
Edit Path Variable

4.In the "Edit Environment Variable" window, click "New" and add the path to the Terraform download folder. In this case, it is C:\Users\LENOVO\terraform.exe.

Add Terraform to Path Variable

5.Click "OK" to save the changes.

Step 3: Verify the Installation

  1. Open a Command Prompt window.

  2. Run the following command to verify that Terraform is installed:

terraform version

If Terraform is installed correctly, the version number should be displayed, indicating that the correct version of Terraform has been installed.

Verify Terraform Installation