Skip to content

Commit 594395f

Browse files
authored
Merge pull request #1502 from mattanja/bugfix/output-ipv6-for-single-node
Fix: Output public ipv6 on single-node-clusters
2 parents a903886 + c55cc1f commit 594395f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

output.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ output "agents_public_ipv4" {
2828
}
2929

3030
output "ingress_public_ipv4" {
31-
description = "The public IPv4 address of the Hetzner load balancer"
31+
description = "The public IPv4 address of the Hetzner load balancer (with fallback to first control plane node)"
3232
value = local.has_external_load_balancer ? module.control_planes[keys(module.control_planes)[0]].ipv4_address : hcloud_load_balancer.cluster[0].ipv4
3333
}
3434

3535
output "ingress_public_ipv6" {
36-
description = "The public IPv6 address of the Hetzner load balancer"
37-
value = (local.has_external_load_balancer || var.load_balancer_disable_ipv6) ? null : hcloud_load_balancer.cluster[0].ipv6
36+
description = "The public IPv6 address of the Hetzner load balancer (with fallback to first control plane node)"
37+
value = local.has_external_load_balancer ? module.control_planes[keys(module.control_planes)[0]].ipv6_address : (var.load_balancer_disable_ipv6 ? null : hcloud_load_balancer.cluster[0].ipv6)
3838
}
3939

4040
output "k3s_endpoint" {

0 commit comments

Comments
 (0)