Part 2: Installing Terraform
Installing Terraform
Go to the official Terraform download page and acquire the most recent version for the platform you want to use.
Extract the Terraform binary from the download by unzipping it. All you have to do to get Terraform running is move the binary into a folder that is in your path. Terraform runs as a single binary.
Fig 1.1- Terraform |
- Open up a Terminal
- Change into the downloads directory, normally by running cd ~/Downloads
- Move the Terraform binary into /usr/local/bin by running mv ~/Downloads/terraform/usr/local/bin/
- Test the installation by running terraform version, if installation is successful then you should see such as Terraform version
Windows Operating Systems
- Move the unzipped Terraform binary into your desired folder such as c:\Terraform
- Search for View advanced system settings
- In then window that appears click environment variables
- In the system variables section at the bottom find the path variable, left click it to select it and then click edit
- In the edit system variable window scroll to the end of the variable value box, ensure that it ends in a ; then enter the path where you moved the Terraform binary into e.g. c:\Terraform
Check status
- Open up a Command prompt by pressing the windows key, typing cmd and pressing enter.
- Test the installation by running terraform version, if installation is successful then you should see such as Terraform version