Download Terraform from https://www.terraform.io/downloads.html
I using windows that's why I choose Windows 64-bit
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.."
Choose Environment Variables...
Find Path in the System variables and click Edit
Click on New and provide path to your terraform.exe file. Click OK.
Open your favorite command line tool and verifying the Installation
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
Log inn to 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
- Azure Terraform
To install extensions Press F1 and start typing ext or (Ctrl + Shift + X)
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