Skip to content

Instantly share code, notes, and snippets.

@lenardchristopher
Created April 14, 2021 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lenardchristopher/5362aa18460161e0d730f2b49ff9fa6d to your computer and use it in GitHub Desktop.
Save lenardchristopher/5362aa18460161e0d730f2b49ff9fa6d to your computer and use it in GitHub Desktop.
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