Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
An example of a for_each loop in Terraform.
resource "azurerm_resource_group" "rg" {
for_each = {
a_group = "eastus"
another_group = "westus2"
}
name = each.key
location = each.value
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment