forked from kube-hetzner/terraform-hcloud-kube-hetzner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
output.tf
47 lines (40 loc) · 1.41 KB
/
output.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
output "cluster_name" {
value = var.cluster_name
description = "Shared suffix for all resources belonging to this cluster."
}
output "control_planes_public_ipv4" {
value = [
for obj in module.control_planes : obj.ipv4_address
]
description = "The public IPv4 addresses of the controlplane servers."
}
output "agents_public_ipv4" {
value = [
for obj in module.agents : obj.ipv4_address
]
description = "The public IPv4 addresses of the agent servers."
}
output "ingress_public_ipv4" {
description = "The public IPv4 address of the Hetzner load balancer"
value = local.has_external_load_balancer ? null : data.hcloud_load_balancer.cluster[0].ipv4
}
output "ingress_public_ipv6" {
description = "The public IPv6 address of the Hetzner load balancer"
value = (local.has_external_load_balancer || var.load_balancer_disable_ipv6) ? null : data.hcloud_load_balancer.cluster[0].ipv6
}
# Keeping for backward compatibility
output "kubeconfig_file" {
value = local.kubeconfig_external
description = "Kubeconfig file content with external IP address"
sensitive = true
}
output "kubeconfig" {
value = local.kubeconfig_external
description = "Kubeconfig file content with external IP address"
sensitive = true
}
output "kubeconfig_data" {
description = "Structured kubeconfig data to supply to other providers"
value = local.kubeconfig_data
sensitive = true
}