Skip to content

Commit

Permalink
Removing Virtual Hub ambiguity and fixing example
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudlh committed Jun 18, 2021
1 parent f2d8259 commit 1d2e83f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ vpn_gateway_connections = {
# lz_key = "vpns" # Set the 'lz_key' of a VPN Site created in a remote deployment
key = "vpn-site-1" # Set the 'key' of the VPN Site created in this (or a remote) deployment
}

virtual_wan = {
key = "vwan_re1"
}
# virtual_hub_gateway_id = "" # Set the Resource ID of an existing Virtual Hub's VPN Gateway
virtual_hub = {
# lz_key = "" # Set the 'lz_key' of a Virtual Hub created in a remote deployment
Expand Down
2 changes: 1 addition & 1 deletion networking_vpn_gateway_connection.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module "vpn_gateway_connections" {
route_tables = local.combined_objects_virtual_hub_route_tables

vpn_gateway_id = coalesce(
try(local.combined_objects_virtual_hubs[try(each.value.virtual_hub.lz_key, local.client_config.landingzone_key)][each.value.virtual_hub.key].s2s_gateway.id, null),
try(local.combined_objects_virtual_wans[try(each.value.virtual_wan.lz_key, local.client_config.landingzone_key)][each.value.virtual_wan.key].virtual_hubs[try(each.value.virtual_hub.lz_key, local.client_config.landingzone_key)[each.value.virtual_hub.key]].s2s_gateway.id, null),
try(each.value.virtual_hub_gateway_id, null)
)
}

0 comments on commit 1d2e83f

Please sign in to comment.