Getting started with Azure and Terraform – Part 4
Getting started with Azure and Terraform - Part 3
In this part of the series, I want to create the Azure vNet and subnets for my Azure environment. I will be creating a hub/spoke topology where the hub will be connected to my on-premises environment later in this series. To get started with networking, I read through the modules and providers that Terraform provides. You can find it here .
In the last part I wrote that I wasn’t sure how to handle the number of files and that is still the case, I do however want to change a bit from my last post, so let us get started.
Getting started with Azure and Terraform - Part 2
In this part of the series, I want to start creating my resource groups with Terraform. There are more ways to do this, but since I have been working with automation a bit, I know I want to start with a list of resource group names and make a loop through these.
The first step is to create a list of resource group names. I create a file called “variables.tf” a reserved name in Terraform that you can use to contain the variables you want to use in the automation. I first add the location as a variable since I will be using this value on just about all my resources in the automation. To add this, I can create a variable called “Location”, the type is a string, and the value is for me “WestEurope”. In code, this will look like my code here. To learn more about variables in Terraform, you can go to this site: Input Variables - Configuration Language - Terraform by HashiCorp