Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Sep 30, 2022
1 parent c93bcbf commit 8c42c21
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
3 changes: 2 additions & 1 deletion vpn-transit-gateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ 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 @@ -121,5 +123,4 @@ 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 |
30 changes: 15 additions & 15 deletions vpn-transit-gateway/vpn-config.tf
Original file line number Diff line number Diff line change
Expand Up @@ -91,20 +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_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_json" {
for_each = var.generate_json_files ? local.vpn_site_tunnel_outputs : {}
content = yamlencode({ version = local._module_version, each.key = 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"
}

output "vpn_site_tunnel_outputs" {
value = local.vpn_site_tunnel_outputs
resource "local_sensitive_file" "vpn_site_details_yaml" {
for_each = var.generate_yaml_files ? local.vpn_site_tunnel_outputs : {}
content = yamlencode({ version = local._module_version, each.key = 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 8c42c21

Please sign in to comment.