Read this nice blog for introduction.

Download Terraform from https://www.terraform.io/downloads.html

I using windows that's why I choose Windows 64-bit

Windows

Terrafrom is packaged as zip archive.

Create a folder on your disk f.ex Terraform and download terraform zip package there. After downloading Terraform, unzip the package.

You need only terraform.exe file. To make this file available everywhere in your system, this file has to be added to Path environment variable.

Just click on windows tast and start typing: "env.."

Environment variables

Choose Environment Variables...

System Properties

Find Path in the System variables and click Edit

Edit environment variable

Click on New and provide path to your terraform.exe file. Click OK.

Open your favorite command line tool and verifying the Installation

Verification

Here I am using Cmder command utility. Can be download from here. I think this is the best command line tool I have ever used on windows box.

Output should be something like this

Verification

I am going to use Azure DevOps and Azure Portal. You can read my blogs how to Create Azure DevOps Account and Azure Account.

Log inn to Azure DevOps

Azure DevOps

Click on Create project and called it TerrafromConfiguration and repository called WebApp. To read how to create a project and a repository read my blog here.

Link to the project: https://dev.azure.com/sergeydotnet/TerraformConfiguration/_git/WebApp

My favorite editor to work with Terraform is Visual Studio Code, can be installed from here and then we have to install at least two extensions

  1. Terraform
  2. Azure Terraform

To install extensions Press F1 and start typing ext or (Ctrl + Shift + X)

Visual Studio Code

Choose Extensions: Install Extensions

Search for those extensions and install them, then reload editor.

Now you are ready to write som code.

It's always a good practice to read documentation and HashiCorp did a very good job. Read here.

Examples how to use terraform provider azurerm, can be found here.

Take a look at my next blog Create Azure Resource Group using Terraform


Learning HashiCorp Terraform

Download Terraform

Download cmder

Download Visual Studio Code

Create a new project Azure DevOps

Create Azure DevOps account

Create Azure account

Terraform Configuration project

Terraform Documentation

Terraform provider azurerm examples