Skip to content

Commit

Permalink
feat(connectivity): custom Settings for Virtual Hub connection names (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
birdnathan authored Feb 10, 2024
1 parent 6b1783a commit 4bb8288
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions modules/connectivity/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -1826,10 +1826,16 @@ locals {
for spoke_resource_id in distinct(concat(virtual_hub_config.config.spoke_virtual_network_resource_ids, virtual_hub_config.config.secure_spoke_virtual_network_resource_ids)) :
{
# Resource logic attributes
resource_id = "${local.virtual_hub_resource_id[location]}/hubVirtualNetworkConnections/peering-${uuidv5("url", spoke_resource_id)}"
resource_id = try(
"${local.virtual_hub_resource_id[location]}/hubVirtualNetworkConnections/${local.custom_settings.azurerm_virtual_hub_connection["virtual_wan"][location][spoke_resource_id].name}",
"${local.virtual_hub_resource_id[location]}/hubVirtualNetworkConnections/peering-${uuidv5("url", spoke_resource_id)}"
)
managed_by_module = local.deploy_virtual_hub_connection[location]
# Resource definition attributes
name = "peering-${uuidv5("url", spoke_resource_id)}"
name = try(
local.custom_settings.azurerm_virtual_hub_connection["virtual_wan"][location][spoke_resource_id].name,
"peering-${uuidv5("url", spoke_resource_id)}"
)
virtual_hub_id = local.virtual_hub_resource_id[location]
remote_virtual_network_id = spoke_resource_id
# Optional definition attributes
Expand Down

0 comments on commit 4bb8288

Please sign in to comment.