Managing Terraform resources dependencies
One of main Terraform’s features is to allows the parallelization of operations by considering resource dependencies.
In this recipe we will learn how to create dependencies between resources by using 2 different ways: implicit and explicit dependencies.
Let's get started!
Getting ready
To complete this recipe, no technical requirements is needed.
To start this recipe, we will use the following Terraform configuration to provision an Azure Resource group and inside it one Azure Virtual Network.
Here the basic configuration:
resource "azurerm_resource_group" "rg" {
name = "rgdep"
location = "West Europe"
}
resource "azurerm_virtual_network" "vnet" {
name = "vnet"
location = "West Europe"
resource_group_name = "rgdep"
address_space = ["10.0.0.0/16"]
}
The problem with this above configuration...