-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
301 lines (255 loc) · 8.32 KB
/
variables.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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
variable "control_plane_nodes" {
type = map(object({
server_type = string
image = optional(string, "ubuntu-22.04"),
datacenter = string
}))
description = "Map with key = node_name and containing server_type"
}
variable "worker_nodes" {
type = map(object({
server_type = string
image = optional(string, "ubuntu-22.04"),
datacenter = string
}))
description = "Map with key = node_name and containing server_type"
}
variable "cloudinit_linux_kernel_package" {
type = string
default = "linux-kernel-6.2.0-32-generic"
description = "Custom kernel to install using apt to support e.g. BBR and more modern networking stuff than the mainline ubuntu LTS kernel does"
}
variable "cloudinit_containerd_url" {
type = string
description = "URL from where to download the containerd executables"
}
variable "cloudinit_runc_url" {
type = string
description = "URL from where to download the runc executables"
}
variable "cloudinit_containerd_systemd_service_url" {
type = string
description = "URL from where to download the containerd systemd service definition"
}
variable "cloudinit_cni_plugins_url" {
type = string
description = "URL from where to download the CNI plugins"
}
variable "cloudinit_nerdctl_url" {
type = string
description = "URL from where to download the nerdctl executables"
}
variable "cloudinit_kubernetes_apt_keyring" {
type = string
description = "URL from where to download the apt keyring for kubernetes' repository"
}
variable "cloudinit_kubernetes_version" {
type = string
description = "Kubernetes version to install via apt of the form <X.Y.Z>. The mandatory -00 is automatically added"
}
variable "dns_root" {
type = string
description = "Common root for all DNS records for cluster nodes"
default = "example.com"
}
variable "dns_cluster_subdomain" {
type = string
default = "cluster"
}
variable "dns_fleet_subdomain" {
type = string
default = "fleet"
}
variable "hcloud_api_token" {
description = "Hetzner Cloud API Token"
type = string
sensitive = true
}
variable "ssh_user" {
description = "SSH user"
type = string
default = "root"
sensitive = true
}
variable "ssh_public_key_file" {
description = "SSH public key file path"
default = "./.ssh/id_rsa.pub"
type = string
sensitive = true
}
variable "ssh_private_key_file" {
description = "SSH private key file path"
type = string
default = "./.ssh/id_rsa"
sensitive = true
}
variable "control_plane_api_server_port" {
type = number
default = 6443
description = "Kubernetes API Server port"
}
variable "primary_control_plane_node" {
type = string
description = "Primary control plane node on which to run kubeadm init. Must be a DNS name."
default = "control-plane"
}
variable "enable_firewall" {
type = bool
default = true
description = "Enable Hetzner Cloud Firewall"
}
variable "static_firewall_rules" {
type = list(object({
direction = string
protocol = string
port = optional(string)
source_ips = list(string)
}))
}
variable "enable_cloudflare_dns" {
type = bool
default = false
description = "Enables Cloudflare DNS records. Requires cloudflare_zone_id, cloudflare_email, and cloudflare_api_key"
# validation {
# condition = var.enable_cloudflare_dns && length(var.cloudflare_zone_id) > 0 && length(var.cloudflare_email) > 0 && length(var.cloudflare_api_key) > 0
# error_message = "enable_cloudflare_dns requires cloudflare_zone_id, cloudflare_email, and cloudflare_api_key"
# }
}
variable "cloudflare_zone_id" {
type = string
sensitive = true
default = ""
description = "Cloudflare DNS Zone ID"
}
variable "cloudflare_email" {
type = string
sensitive = true
default = ""
description = "Email to use for Cloudflare authentication"
}
variable "cloudflare_api_key" {
sensitive = true
type = string
default = ""
description = "Cloudflare API token for accessing DNS zones"
}
variable "enable_traefik" {
type = bool
default = true
description = "Enables deploying Traefik Ingress controller"
}
variable "enable_ingress_nginx" {
type = bool
default = false
description = "Enables deploying ingress-nginx"
}
variable "enable_cert_manager" {
type = bool
default = true
description = "Enables cert-manager to be deployed"
}
variable "enable_cert_manager_csi_driver" {
type = bool
default = true
description = "Enables cert-manager's CSI driver to be deployed"
}
variable "cert_manager_http01_ingress_class_name" {
type = string
default = "traefik"
description = "Ingress class to use for HTTP01 issuers temporary ingress resources"
}
variable "lets_encrypt_email" {
type = string
description = "Email to use for Let's Encrypt ClusterIssuer"
}
variable "enable_lets_encrypt_http01" {
type = bool
default = false
description = "Enables creating cert-manager HTTP01 ClusterIssuers with Let's Encrypt"
}
variable "enable_lets_encrypt_dns01" {
type = bool
default = false
description = "Enables creating cert-manager DNS01 ClusterIssuer with Let's Encrypt"
}
variable "enable_google_trust_services_http01" {
type = bool
default = false
description = "Enables creating cert-manager HTTP01 ClusterIssuers for Google Trust Services. Requires google_cloud_platform_eab_kid and google_cloud_platform_eab_hmac_key to be provided"
# validation {
# condition = var.enable_google_trust_services && length(var.google_cloud_platform_eab_kid) > 0 && length(var.google_cloud_platform_eab_hmac_key) > 0
# error_message = "enable_google_trust_services_http01 requires google_cloud_platform_eab_kid and google_cloud_platform_eab_hmac_key to be provided"
# }
}
variable "enable_google_trust_services_dns01" {
type = bool
default = false
description = "Enables creating cert-manager DNS01 ClusterIssuers for Google Trust Services. Requires google_cloud_platform_eab_kid and google_cloud_platform_eab_hmac_key to be provided"
# validation {
# condition = var.enable_google_trust_services && length(var.google_cloud_platform_eab_kid) > 0 && length(var.google_cloud_platform_eab_hmac_key) > 0
# error_message = "enable_google_trust_services_dns01 requires google_cloud_platform_eab_kid and google_cloud_platform_eab_hmac_key to be provided"
# }
}
variable "google_cloud_platform_eab_kid" {
sensitive = true
type = string
default = ""
description = "Google Trust Services EAB Key ID"
}
variable "google_cloud_platform_eab_hmac_key" {
sensitive = true
type = string
default = ""
description = "Google Trust Services EAB HMAC Key"
}
variable "google_cloud_platform_email" {
sensitive = true
type = string
default = ""
description = "Email address to use for Google Trust Services"
}
variable "enable_hetzner_cloud_controller_manager" {
type = bool
default = true
description = "Enables deploying Hetzner Cloud Controller Manager"
}
variable "enable_hetzner_cloud_controller_manager_routes" {
type = bool
default = false
description = "Enables route creation for pod routing on the virtual network"
}
variable "enable_metrics_server" {
type = bool
default = true
description = "Enables deploying Kubernetes' metrics-server"
}
variable "enable_kubelet_tls_bootstrapping_controller" {
type = bool
default = true
description = "Enables deploying Kubelet TLS Bootstrapping controller"
}
variable "enable_local_path_provisioner" {
type = bool
default = true
description = "Enables deploying Rancher's local-path-provisioner"
}
variable "enable_gateway_api" {
type = bool
default = true
description = "Enables deploying Kubernetes' SIG Networking's Gateway API CRDs and webhook"
}
variable "enable_metallb" {
type = bool
default = true
description = "Enables deploying MetalLB"
}
variable "enable_tetragon" {
type = bool
default = false
description = "Enables deploying Cilium's Tetragon"
}
variable "cilium_values" {
type = string
default = ""
description = "Cilium values as YAML string"
}