Install terraform on Windows
In this post we will install terraform on windows step by step.
Download Terraform on Windows
Search terraform download on browser or open terraforms official website from here Terraform Download
Download the latest release of the terraform package, previous release can also be downloaded as per the requirement.
After downloading the package, Extract it and we can see terraform.exe file in the folder
Read More: Install terraform in Linux
Now open command prompt and navigate to the folder where you have extracted the terraform package and run the below terraform version command (terraform –version), you can see the version as an output but if we try the same command outside this folder, we will get the below error.
C:\Users\Admin>terraform --version
'terraform' is not recognized as an internal or external command,
operable program or batch file.
To avoid the above error we will add an entry in the path section of the environment variables
Configure System Environment Variables for Terraform
Go to start and search for Edit the system environment variables and click on Environment Variables…
Double click on the Path section
Click on New to add an entry in the section and paste the terraform file location, in my case the file got downloaded inside Downloads folder but you can move the file anywhere you want and set the path here
This time if we try running the terraform version command in a new command prompt terminal it will work from any location
Command to check the terraform version
terraform --version
Command to check terraforms other primary and workflow command
terraform
Conclusion
In this article we saw all the required steps that aid us to download terraform on windows machine and configure system environment variables which allow us to call terraform from any location.