Getting Started With Terraform on Azure
Check out the official Get Started - Azure tutorial here
Terraform basics
Download and Install
-
Download terraform from https://www.terraform.io/downloads.html
-
Extract the executable and add the folder to your PATH variable
-
Open a shell and type
terraform version -
The basic commands we’ll use are:
terraform initterraform planterraform applyterraform destroy
-
I advise you to use the
terraform fmtcommand often to ensure your scripts well formatted according to HashiCorp’s style conventions
Folder structure
Terrafrom executes on the files within a folder that are named with the .tf extension. Here is what a typical folder structure looks like: