Skip to content

Commit

Permalink
Change module from the fresh main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Mykhailo Danyliuk committed Aug 26, 2023
1 parent feac3f6 commit 4896181
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion locals.combined_objects.tf
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ locals {
combined_objects_vmware_express_route_authorizations = merge(tomap({ (local.client_config.landingzone_key) = module.vmware_express_route_authorizations }), try(var.remote_objects.vmware_express_route_authorizations, {}))
combined_objects_vmware_private_clouds = merge(tomap({ (local.client_config.landingzone_key) = module.vmware_private_clouds }), try(var.remote_objects.vmware_private_clouds, {}), try(var.data_sources.vmware_private_clouds, {}))
combined_objects_vpn_gateway_connections = merge(tomap({ (local.client_config.landingzone_key) = module.vpn_gateway_connections }), try(var.remote_objects.vpn_gateway_connections, {}))
combined_objects_vpn_sites = merge(tomap({ (local.client_config.landingzone_key) = module.vpn_sites }), try(var.remote_objects.vpn_sites, {}))
combined_objects_vpn_sites = merge(tomap({ (local.client_config.landingzone_key) = merge(module.vpn_sites, try(var.data_sources.vpn_sites, {})) }), try(var.remote_objects.vpn_sites, {}))
combined_objects_web_pubsub_hubs = merge(tomap({ (local.client_config.landingzone_key) = module.web_pubsub_hubs }), try(var.remote_objects.web_pubsub_hubs, {}))
combined_objects_web_pubsubs = merge(tomap({ (local.client_config.landingzone_key) = module.web_pubsubs }), try(var.remote_objects.web_pubsubs, {}))
combined_objects_wvd_application_groups = merge(tomap({ (local.client_config.landingzone_key) = module.wvd_application_groups }), try(var.remote_objects.wvd_application_groups, {}))
Expand Down
4 changes: 2 additions & 2 deletions modules/networking/vpn_gateway_connection/module.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ resource "azurerm_vpn_gateway_connection" "vpn_gateway_connection" {
internet_security_enabled = var.settings.internet_security_enabled

remote_vpn_site_id = coalesce(
try(var.vpn_sites[try(var.settings.vpn_site.lz_key, var.client_config.landingzone_key)][var.settings.vpn_site.key].vpn_site.id, null),
try(var.vpn_sites.vpn_site.id, null),
try(var.settings.vpn_site_id, null)
)

Expand All @@ -32,7 +32,7 @@ resource "azurerm_vpn_gateway_connection" "vpn_gateway_connection" {
policy_based_traffic_selector_enabled = try(vpn_link.value.policy_based_traffic_selector_enabled, null)

vpn_site_link_id = coalesce(
try(var.vpn_sites[try(var.settings.vpn_site.lz_key, var.client_config.landingzone_key)][var.settings.vpn_site.key].vpn_site.link[vpn_link.value.link_index].id, null),
try(var.vpn_sites.vpn_site.link[vpn_link.value.link_index].id, null),
try(vpn_link.value.vpn_link_id, null)
)

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 @@ -17,7 +17,7 @@ module "vpn_gateway_connections" {
settings = each.value
global_settings = local.global_settings
client_config = local.client_config
vpn_sites = local.combined_objects_vpn_sites
vpn_sites = local.combined_objects_vpn_sites[try(each.value.vpn_site.lz_key, local.client_config.landingzone_key)][each.value.vpn_site.key]
route_tables = local.combined_objects_virtual_hub_route_tables

vpn_gateway_id = can(each.value.virtual_hub_gateway_id) || can(each.value.virtual_wan) ? try(each.value.virtual_hub_gateway_id, local.combined_objects_virtual_wans[try(each.value.virtual_wan.lz_key, each.value.lz_key, local.client_config.landingzone_key)][try(each.value.virtual_wan.key, each.value.virtual_wan_key)].virtual_hubs[try(each.value.virtual_hub.key, each.value.virtual_hub_key)].s2s_gateway.id) : 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
Expand Down

0 comments on commit 4896181

Please sign in to comment.