How to setup Terraform on Windows 10
Brand new to Terraform? Let’s take the first step to install and set it up on your Windows 10 OS.
Terraform can run on just about every OS, but in this guide we are only focusing on Windows 10 setup.
Step 1: Downloading the software
Download Terraform - Terraform by HashiCorp
Terraform is distributed as a binary or as a package for each of the major operating systems and multiple Linux…
More than likely your OS is 64 bit, so let’s download the 64 bit Windows option.
It will download a zip file with only 1 file inside of it. Extract this file anywhere you’d like, personally I put the Terraform file into C:\Users\<Username>\ and right into this home user directory.
Step 2: Validate that it is working
Open CMD and type terraform — version as written below:
When it displays the version, that is good.
However, let’s try this.
Type in : cd ..
to change directory out of your current user.
try the command again..
It won’t work. It won’t work because Terraform is only located in your user directory, so when you go outside your user directory, or even into a different user directory, the command line will not find Terraform.
So type in : cd <username> to change your directory back to your usernames home.
Step 3: Enable the directory as an Environment variable path in system properties
Copy your directory path to your users home directory
Open up your documents, and Right click on “This PC” go to Properties
Select Advanced System settings
Select Environment Variables
Double click on Path under System variables
Copy+Paste and hit enter :
Did you get this error? Yeah, me too.
Remember to remove the “>” at the end of your path
Now that it’s in we can hit “Ok”
NOW, because we did this, if we go back into CMD and type in cd .. to go out of our user home directory, now Terraform will work no matter what.
That’s the end of this quick introduction.
Stay tuned while I make the next Terraform lab for a beginner lab!