Skip to content

Commit

Permalink
update output
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Oct 19, 2021
1 parent 6217ba0 commit 21726a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions vpn/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ locals {
bgp_asn_id = v.bgp_asn_id
ip_address = v.ip_address
} }
_vpn_settings = var.create ? local.vpn_settings : {}

base_tags = {
"boc:tf_module_version" = local._module_version
Expand Down
4 changes: 2 additions & 2 deletions vpn/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
output "vpn_tunnel_endpoints" {
description = "VPN Tunnel Endpoint IP Addresses"
value = { for k in keys(local.vpn_settings) : k => {
value = { for k in keys(local._vpn_settings) : k => {
site = k
customer_address = aws_customer_gateway.vpn[k].ip_address
bgp_asn = aws_customer_gateway.vpn[k].bgp_asn
Expand All @@ -14,7 +14,7 @@ output "vpn_tunnel_endpoints" {

output "vpn_labels" {
description = "VPN Labels for Description field of Endpoint device (Cisco ASR)"
value = { for k in keys(local.vpn_settings) : k => {
value = { for k in keys(local._vpn_settings) : k => {
site = k
label = format("aws:%v:%v:%v:%v", local.region, local.account_id, aws_vpn_connection.vpn[k].id, var.vpc_full_name)
}
Expand Down

0 comments on commit 21726a6

Please sign in to comment.