add BGP peers to vpn-ha outputs (#257)

This commit is contained in:
Ludovico Magnocavallo 2021-06-04 15:58:39 +02:00 committed by GitHub
parent 41af710bbe
commit a4158827a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 12 deletions

View File

@ -163,6 +163,7 @@ module "vpn_ha" {
| name | description | sensitive |
|---|---|:---:|
| bgp_peers | BGP peer resources. | |
| external_gateway | External VPN gateway resource. | |
| gateway | VPN gateway resource (only if auto-created). | |
| name | VPN gateway name (only if auto-created). | |

View File

@ -14,13 +14,12 @@
* limitations under the License.
*/
output "gateway" {
description = "VPN gateway resource (only if auto-created)."
value = (
var.vpn_gateway_create
? google_compute_ha_vpn_gateway.ha_gateway[0]
: null
)
output "bgp_peers" {
description = "BGP peer resources."
value = {
for k, v in google_compute_router_peer.bgp_peer : k => v
}
}
output "external_gateway" {
@ -32,6 +31,15 @@ output "external_gateway" {
)
}
output "gateway" {
description = "VPN gateway resource (only if auto-created)."
value = (
var.vpn_gateway_create
? google_compute_ha_vpn_gateway.ha_gateway[0]
: null
)
}
output "name" {
description = "VPN gateway name (only if auto-created). "
value = (
@ -41,6 +49,11 @@ output "name" {
)
}
output "random_secret" {
description = "Generated secret."
value = local.secret
}
output "router" {
description = "Router resource (only if auto-created)."
value = (
@ -83,8 +96,3 @@ output "tunnel_self_links" {
name => try(google_compute_vpn_tunnel.tunnels[name].self_link, null)
}
}
output "random_secret" {
description = "Generated secret."
value = local.secret
}