Last active
April 29, 2026 08:09
-
-
Save spy86/fe9f2dcfac8b88ce8a5f6a67ad9e7561 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| variable "rg_count" { | |
| type = number | |
| default = 2 | |
| } | |
| resource "azurerm_resource_group" "rg_multi" { | |
| count = var.rg_count | |
| name = "rg-${local.name_prefix}-${count.index}" | |
| location = var.location | |
| tags = local.common_tags | |
| } | |
| output "rg_names_v1" { | |
| value = [for rg in azurerm_resource_group.rg_multi : rg.name] | |
| } | |
| output "rg_names_v2" { | |
| value = azurerm_resource_group.rg_multi[*].name | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment