diff --git a/vpn-transit-gateway/vpn-config.tf b/vpn-transit-gateway/vpn-config.tf index c05c65f..2696505 100644 --- a/vpn-transit-gateway/vpn-config.tf +++ b/vpn-transit-gateway/vpn-config.tf @@ -1,7 +1,7 @@ locals { vpn_tunnel_outputs = { for k, v in local.vpn_settings : k => { site = v.site - environment = v.environment + vpn_environment = v.environment sequence = v.sequence label = v.label full_label = format("aws:%v:%v:%v:%v", local.region, local.account_id, aws_vpn_connection.vpn[k].id, v.label) @@ -71,7 +71,7 @@ resource "null_resource" "generate_configs" { resource "local_sensitive_file" "vpn_details_json" { for_each = local.vpn_tunnel_outputs # content = templatefile("${path.module}/templates/vpn_details.tpl"), { - content = jsonencode(merge({ version = local._module_version, name = each.key }, each.value, local.vpn_tunnel_secrets[each.key])) + content = jsonencode(merge({ version = local._module_version, vpn_name = each.key }, each.value, local.vpn_tunnel_secrets[each.key])) filename = format("%v/%v/%v.%v.%v.json", path.root, null_resource.directory_setup.triggers.name, local.account_id, local.region, each.key) file_permission = "0644" } @@ -79,7 +79,7 @@ resource "local_sensitive_file" "vpn_details_json" { resource "local_sensitive_file" "vpn_details_yaml" { for_each = local.vpn_tunnel_outputs # content = templatefile("${path.module}/templates/vpn_details.tpl"), { - content = yamlencode(merge({ version = local._module_version, name = each.key }, each.value, local.vpn_tunnel_secrets[each.key])) + content = yamlencode(merge({ version = local._module_version, vpn_name = each.key }, each.value, local.vpn_tunnel_secrets[each.key])) filename = format("%v/%v/%v.%v.%v.yml", path.root, null_resource.directory_setup.triggers.name, local.account_id, local.region, each.key) file_permission = "0644" }