Skip to content

Commit

Permalink
Merge pull request #2 from schubergphilis/fix/tags
Browse files Browse the repository at this point in the history
fix: tags
  • Loading branch information
gillianstravers authored Dec 10, 2024
2 parents f5202cb + 91fcd91 commit 9f088ec
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
# This Terraform configuration defines resources and a module for deploying an Azure Virtual WAN setup.

resource "azurerm_resource_group" "this" {
name = var.resource_group.name
location = var.resource_group.location
tags = merge(
try(var.tags),
tomap({
"Resource Type" = "Resource Group"
})
)
}

resource "azurerm_virtual_wan" "this" {
name = var.virtual_wan.name
resource_group_name = azurerm_resource_group.this.name
location = coalesce(var.virtual_wan.location, azurerm_resource_group.this.location)
tags = merge(
try(var.tags),
tomap({
"Resource Type" = "Virtual WAN"
})
)
}

module "vhub" {
Expand All @@ -17,4 +28,9 @@ module "vhub" {
virtual_hubs = var.virtual_hubs[each.key]
virtual_wan_id = azurerm_virtual_wan.this.id
resource_group_name = azurerm_resource_group.this.name
}
tags = merge(
try(var.tags),
tomap({
})
)
}

0 comments on commit 9f088ec

Please sign in to comment.