Skip to content

Commit

Permalink
add account, region, cidr_block, and put into file names; add shared …
Browse files Browse the repository at this point in the history
…keys
  • Loading branch information
badra001 committed Sep 19, 2022
1 parent dad2c70 commit e37d2b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vpn-transit-gateway/vpn-config.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ 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))
filename = format("${path.root}/%v/%v.vpn_details.json", null_resource.directory_setup.triggers.name, each.key)
filename = format("${path.root}/%v/%v.%v.%v.json", 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))
filename = format("${path.root}/%v/%v.vpn_details.yml", null_resource.directory_setup.triggers.name, each.key)
filename = format("${path.root}/%v/%v.%v.%v.yml", null_resource.directory_setup.triggers.name, local.account_id, local.region, each.key)
file_permission = "0644"
}

0 comments on commit e37d2b8

Please sign in to comment.