Course outlines for learning terraform.
resource "azurerm_resource_group" "example" {
count = 2
name = "example-${count.index}"
location = "West Europe"
}
resource "azurerm_resource_group" "example" {
for_each = toset( ["westeurope", "easteurope"] )
name = "example-${each.value}"
location = each.value
}
resource "azurerm_resource_group" "example" {
for_each = {
my_first_resource_group = "westeurope"
my_second_resource_group = "easteurope"
}
name = each.key
location = each.value
}