Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Sep 30, 2022
1 parent 239f770 commit c93bcbf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
3 changes: 1 addition & 2 deletions vpn-transit-gateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down Expand Up @@ -123,4 +121,5 @@ No modules.
| <a name="output_customer_gateway_arns"></a> [customer\_gateway\_arns](#output\_customer\_gateway\_arns) | AWS Customer Gateway ARNs |
| <a name="output_customer_gateway_ids"></a> [customer\_gateway\_ids](#output\_customer\_gateway\_ids) | AWS Customer Gateway IDs |
| <a name="output_vpn_labels"></a> [vpn\_labels](#output\_vpn\_labels) | VPN Labels for Description field of Endpoint device (Cisco ASR) |
| <a name="output_vpn_site_tunnel_outputs"></a> [vpn\_site\_tunnel\_outputs](#output\_vpn\_site\_tunnel\_outputs) | n/a |
| <a name="output_vpn_tunnel_endpoints"></a> [vpn\_tunnel\_endpoints](#output\_vpn\_tunnel\_endpoints) | VPN Tunnel Endpoint IP Addresses |
26 changes: 15 additions & 11 deletions vpn-transit-gateway/vpn-config.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit c93bcbf

Please sign in to comment.