Skip to content

Commit

Permalink
change name to vpn_name, environment to vpn_environment
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Sep 29, 2022
1 parent 3c92f15 commit 736d1af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vpn-transit-gateway/vpn-config.tf
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -71,15 +71,15 @@ 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"
}

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"
}

0 comments on commit 736d1af

Please sign in to comment.