From c93bcbf37017e954c55449712ee3278e5675bb01 Mon Sep 17 00:00:00 2001 From: badra001 Date: Fri, 30 Sep 2022 10:02:25 -0400 Subject: [PATCH] debug --- vpn-transit-gateway/README.md | 3 +-- vpn-transit-gateway/vpn-config.tf | 26 +++++++++++++++----------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/vpn-transit-gateway/README.md b/vpn-transit-gateway/README.md index 70b8238..b585128 100644 --- a/vpn-transit-gateway/README.md +++ b/vpn-transit-gateway/README.md @@ -78,8 +78,6 @@ No modules. | [aws_vpn_connection.vpn](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpn_connection) | resource | | [local_sensitive_file.vpn_details_json](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/sensitive_file) | resource | | [local_sensitive_file.vpn_details_yaml](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/sensitive_file) | resource | -| [local_sensitive_file.vpn_site_details_json](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/sensitive_file) | resource | -| [local_sensitive_file.vpn_site_details_yaml](https://registry.terraform.io/providers/hashicorp/local/latest/docs/resources/sensitive_file) | resource | | [null_resource.directory_setup](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource | | [null_resource.generate_configs](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource | | [random_string.tunnel_preshared_key](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/string) | resource | @@ -123,4 +121,5 @@ No modules. | [customer\_gateway\_arns](#output\_customer\_gateway\_arns) | AWS Customer Gateway ARNs | | [customer\_gateway\_ids](#output\_customer\_gateway\_ids) | AWS Customer Gateway IDs | | [vpn\_labels](#output\_vpn\_labels) | VPN Labels for Description field of Endpoint device (Cisco ASR) | +| [vpn\_site\_tunnel\_outputs](#output\_vpn\_site\_tunnel\_outputs) | n/a | | [vpn\_tunnel\_endpoints](#output\_vpn\_tunnel\_endpoints) | VPN Tunnel Endpoint IP Addresses | diff --git a/vpn-transit-gateway/vpn-config.tf b/vpn-transit-gateway/vpn-config.tf index 98b2039..07c030a 100644 --- a/vpn-transit-gateway/vpn-config.tf +++ b/vpn-transit-gateway/vpn-config.tf @@ -91,16 +91,20 @@ resource "local_sensitive_file" "vpn_details_yaml" { file_permission = "0644" } -resource "local_sensitive_file" "vpn_site_details_json" { - for_each = var.generate_json_files ? local.vpn_site_tunnel_outputs : {} - content = jsonencode(merge({ version = local._module_version }, tomap(each.value))) - filename = format("%v/%v/site.%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_site_details_json" { +## for_each = var.generate_json_files ? local.vpn_site_tunnel_outputs : {} +## content = jsonencode(merge({ version = local._module_version }, tomap(each.value))) +## filename = format("%v/%v/site.%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_site_details_yaml" { +## for_each = var.generate_yaml_files ? local.vpn_site_tunnel_outputs : {} +## content = yamlencode(merge({ version = local._module_version }, tomap(each.value))) +## filename = format("%v/%v/site.%v.%v.%v.yml", path.root, null_resource.directory_setup.triggers.name, local.account_id, local.region, each.key) +## file_permission = "0644" +## } -resource "local_sensitive_file" "vpn_site_details_yaml" { - for_each = var.generate_yaml_files ? local.vpn_site_tunnel_outputs : {} - content = yamlencode(merge({ version = local._module_version }, tomap(each.value))) - filename = format("%v/%v/site.%v.%v.%v.yml", path.root, null_resource.directory_setup.triggers.name, local.account_id, local.region, each.key) - file_permission = "0644" +output "vpn_site_tunnel_outputs" { + value = local.vpn_site_tunnel_outputs }