Skip to content

Commit

Permalink
use secrets in tunnel outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Oct 14, 2022
1 parent 82453ae commit 79bca22
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion vpn-transit-gateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ module "vpn_transit-gateway" {
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.66.0 |
| <a name="requirement_ldap"></a> [ldap](#requirement\_ldap) | >= 0.5.4 |
| <a name="requirement_local"></a> [local](#requirement\_local) | >= 1.0.0 |
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 3.0 |
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 3.0 |
| <a name="requirement_template"></a> [template](#requirement\_template) | >= 2.0 |
Expand All @@ -56,7 +57,7 @@ module "vpn_transit-gateway" {
| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 3.66.0 |
| <a name="provider_local"></a> [local](#provider\_local) | n/a |
| <a name="provider_local"></a> [local](#provider\_local) | >= 1.0.0 |
| <a name="provider_null"></a> [null](#provider\_null) | >= 3.0 |
| <a name="provider_random"></a> [random](#provider\_random) | >= 3.0 |

Expand Down
4 changes: 2 additions & 2 deletions vpn-transit-gateway/vpn-config.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ locals {
}
vpn_tunnel_sites = distinct([for k, v in local.vpn_tunnel_outputs : v.site])
# use tunnel secrets if needed
# vpn_site_tunnel_outputs = { for s in local.vpn_tunnel_sites: s => flatten([ for k,v in local.vpn_tunnel_outputs: merge(v,local.vpn_tunnel_secrets[k]) if v.site=s ]) }
vpn_site_tunnel_outputs = { for s in local.vpn_tunnel_sites : s => flatten([for k, v in local.vpn_tunnel_outputs : v if v.site == s]) }
vpn_site_tunnel_outputs = { for s in local.vpn_tunnel_sites : s => flatten([for k, v in local.vpn_tunnel_outputs : merge(v, local.vpn_tunnel_secrets[k]) if v.site == s]) }
# vpn_site_tunnel_outputs = { for s in local.vpn_tunnel_sites : s => flatten([for k, v in local.vpn_tunnel_outputs : v if v.site == s]) }
vpn_site_common_settings = ["account_alias", "account_id", "region", "region_short", "vpc_cidr_block", "vpc_name", "vpc_short_name", "vpn_environment"]
}

Expand Down

0 comments on commit 79bca22

Please sign in to comment.