Files
terraform-binarylane/modules/binarylane/outputs.tf
T
unkin-agent d4d62ffcf4
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Split each DMZ into a postfix edge host and a WireGuard vpn host
2026-10-12 22:08:09 +11:00

23 lines
794 B
Terraform

output "hosts" {
description = "Hostname, public IPv4, VPC IPv4 and (vpn hosts) WireGuard public key per host."
value = merge(
{ for k, v in binarylane_server.edge : k => {
hostname = v.name
public_ipv4 = v.public_ipv4_addresses[0]
vpc_ipv4 = local.edges[k].vpc_ip
} },
{ for k, v in binarylane_server.vpn : k => {
hostname = v.name
public_ipv4 = v.public_ipv4_addresses[0]
vpc_ipv4 = local.vpns[k].vpc_ip
wg_address = local.vpns[k].wg_address
wg_pubkey = wireguard_asymmetric_key.vpn[k].public_key
} },
)
}
output "hub" {
description = "prodnxsr0020 end of the tunnels."
value = { address = local.hub_address, public_key = wireguard_asymmetric_key.hub.public_key, listen_port = local.hub_port }
}