Part 1: Terraform with Azure – How to install Terraform

Reading Time: 3 minutes

Welcome to part 1 of Terraform on Azure. My journey on learning Terraform to allow me to automate workloads within Microsoft Azure. If you’ve not already done so, please subscribe to stay up to date on the latest blog posts.

Let’s get started 🙂

What is Terraform?
Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. Terraform can manage existing and popular service providers as well as custom in-house solutions. Terraform is a tool and also a language. That language is called Hashicorp Config language (HCL).

Configuration files describe to Terraform the components needed to run a single application or your entire datacenter. Terraform generates an execution plan describing what it will do to reach the desired state, and then executes it to build the described infrastructure. As the configuration changes, Terraform is able to determine what changed and create incremental execution plans which can be applied.

Terraform can be used to automate the provisioning of cloud infrastructure. Terraform will allow you to write and deploy your cloud infrastructure setup in code. If you have experience with Microsoft Azure or other cloud providers such as AWS, Google Cloud etc, you will know that deploying infrastructure using the Microsoft Azure Portal is a manual and repetitive task which an be time consuming. Terraform helps automate your builds by using Infrastructure as Code, rather than manually going through the steps in the portal.

How to install Terraform?

1) Visit https://www.terraform.io/
2) Click download

3) Select your operating system. I’ll be selecting Windows for this demo

4) Download Terraform 32 or 64 bit depending on your requirements

5) Extract the file

6) Next add the .exe to the path within Windows – click the start menu, search and click view advanced system settings

7) Click Environmental Variable

8) Click path and click edit

9) Click new

10) Type the path to the Terraform folder you created

11) Click OK, OK and OK

12) To check the change you implemented works, launch powershell or command prompt

13) Type terraform and press enter.

You should receive a similar output to the one below

In part 2, I go through the process of installing a useful tool known as Azure CLI, click the following link to continue on my journey, Part 2: Terraform with Azure – how to install Azure CLI