forked from kube-hetzner/terraform-hcloud-kube-hetzner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
output.tf
134 lines (112 loc) · 3.81 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
output "cluster_name" {
value = var.cluster_name
description = "Shared suffix for all resources belonging to this cluster."
}
output "network_id" {
value = data.hcloud_network.k3s.id
description = "The ID of the HCloud network."
}
output "ssh_key_id" {
value = local.hcloud_ssh_key_id
description = "The ID of the HCloud SSH key."
}
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 "control_planes_public_ipv6" {
value = [
for obj in module.control_planes : obj.ipv6_address
]
description = "The public IPv6 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 "agents_public_ipv6" {
value = [
for obj in module.agents : obj.ipv6_address
]
description = "The public IPv6 addresses of the agent servers."
}
output "ingress_public_ipv4" {
description = "The public IPv4 address of the Hetzner load balancer (with fallback to first control plane node)"
value = local.has_external_load_balancer ? module.control_planes[keys(module.control_planes)[0]].ipv4_address : hcloud_load_balancer.cluster[0].ipv4
}
output "ingress_public_ipv6" {
description = "The public IPv6 address of the Hetzner load balancer (with fallback to first control plane node)"
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)
}
output "k3s_endpoint" {
description = "A controller endpoint to register new nodes"
value = "https://${var.use_control_plane_lb ? hcloud_load_balancer_network.control_plane.*.ip[0] : module.control_planes[keys(module.control_planes)[0]].private_ipv4_address}:6443"
}
output "k3s_token" {
description = "The k3s token to register new nodes"
value = local.k3s_token
sensitive = true
}
output "control_plane_nodes" {
description = "The control plane nodes"
value = [for node in module.control_planes : node]
}
output "agent_nodes" {
description = "The agent nodes"
value = [for node in module.agents : node]
}
# 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
}
output "cilium_values" {
description = "Helm values.yaml used for Cilium"
value = local.cilium_values
sensitive = true
}
output "cert_manager_values" {
description = "Helm values.yaml used for cert-manager"
value = local.cert_manager_values
sensitive = true
}
output "csi_driver_smb_values" {
description = "Helm values.yaml used for SMB CSI driver"
value = local.csi_driver_smb_values
sensitive = true
}
output "longhorn_values" {
description = "Helm values.yaml used for Longhorn"
value = local.longhorn_values
sensitive = true
}
output "traefik_values" {
description = "Helm values.yaml used for Traefik"
value = local.traefik_values
sensitive = true
}
output "nginx_values" {
description = "Helm values.yaml used for nginx-ingress"
value = local.nginx_values
sensitive = true
}
output "haproxy_values" {
description = "Helm values.yaml used for HAProxy"
value = local.haproxy_values
sensitive = true
}