Terraform Variables

Similar to all other programming languages, Terraform also makes use of variables for dynamic coding. You can have a dedicated Terraform variables file with extension .TFVARS within your working directory/folder and this will automatically be referenced in your main Terraform code file, so you can call directly and/or interpolate. There are several different types of … Continue reading Terraform Variables


How to run Terraform Code

In this tutorial, we will be executing Terraform code to create a new Azure Resource Group. Prerequisites Microsoft Visual Studio Code. Terraform extension for Microsoft Visual Studio Code. Code for creating a Resource Group resource "azurerm_resource_group" "web_server_rg" { name="web-rg" location="westus2" } Apply Changes Within Microsoft Visual Studio Code; Right-click our TF file. In this example, … Continue reading How to run Terraform Code

How to create an Azure SPN for Terraform

Service Principal Name is effectively a service account within Azure. Required in this scenario for our Terraform Provider function to connect our TF code to our Azure Subscription. Login to https://portal.azure.com. Click into Azure Active Directory. Click App Registrations >+ New registration. Provide a name for your SPN ie. terraform-spn, provide any valid URL within … Continue reading How to create an Azure SPN for Terraform