Skip to content

Commit 5a0b05d

Browse files
orthizarmrclrchtr
authored andcommitted
fix: update supported server types
Updated the supported server types to reflect the available server types returned by the hetzner api Signed-off-by: Silvan Kohler <[email protected]>
1 parent 36a25f2 commit 5a0b05d

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

talos_patch_worker.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ locals {
33
dummy_workers = local.total_worker_count == 0 ? [{
44
index = 0
55
name = "dummy-worker-0"
6-
server_type = "cx11"
6+
server_type = "cpx11"
77
image_id = null
88
ipv4_public = "0.0.0.0" # Fallback
99
ipv6_public = null # Fallback

variables.tf

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,16 @@ variable "control_plane_server_type" {
201201
type = string
202202
description = <<EOF
203203
The server type to use for the control plane nodes.
204-
Possible values: cx11, cx21, cx22, cx31, cx32, cx41, cx42, cx51, cx52, cpx11, cpx21, cpx31,
205-
cpx41, cpx51, cax11, cax21, cax31, cax41, ccx13, ccx23, ccx33, ccx43, ccx53, ccx63
204+
Possible values: cpx11, cpx12, cpx21, cpx22, cpx31, cpx32, cpx41, cpx42, cpx51, cpx52, cpx62,
205+
cax11, cax21, cax31, cax41, ccx13, ccx23, ccx33, ccx43, ccx53, ccx63,
206+
cx22, cx23, cx32, cx33, cx42, cx43, cx52, cx53
206207
EOF
207208
validation {
208209
condition = contains([
209-
"cx11", "cx21", "cx22", "cx31", "cx32", "cx41", "cx42", "cx51", "cx52",
210-
"cpx11", "cpx21", "cpx31", "cpx41", "cpx51",
210+
"cpx11", "cpx12", "cpx21", "cpx22", "cpx31", "cpx32", "cpx41", "cpx42", "cpx51", "cpx52", "cpx62",
211211
"cax11", "cax21", "cax31", "cax41",
212-
"ccx13", "ccx23", "ccx33", "ccx43", "ccx53", "ccx63"
212+
"ccx13", "ccx23", "ccx33", "ccx43", "ccx53", "ccx63",
213+
"cx22", "cx23", "cx32", "cx33", "cx42", "cx43", "cx52", "cx53"
213214
], var.control_plane_server_type)
214215
error_message = "Invalid control plane server type."
215216
}
@@ -239,18 +240,19 @@ variable "worker_count" {
239240

240241
variable "worker_server_type" {
241242
type = string
242-
default = "cx11"
243+
default = "cpx11"
243244
description = <<EOF
244245
DEPRECATED: Use worker_nodes instead. The server type to use for the worker nodes.
245-
Possible values: cx11, cx21, cx22, cx31, cx32, cx41, cx42, cx51, cx52, cpx11, cpx21, cpx31,
246-
cpx41, cpx51, cax11, cax21, cax31, cax41, ccx13, ccx23, ccx33, ccx43, ccx53, ccx63
246+
Possible values: cpx11, cpx12, cpx21, cpx22, cpx31, cpx32, cpx41, cpx42, cpx51, cpx52, cpx62,
247+
cax11, cax21, cax31, cax41, ccx13, ccx23, ccx33, ccx43, ccx53, ccx63,
248+
cx22, cx23, cx32, cx33, cx42, cx43, cx52, cx53
247249
EOF
248250
validation {
249251
condition = contains([
250-
"cx11", "cx21", "cx22", "cx31", "cx32", "cx41", "cx42", "cx51", "cx52",
251-
"cpx11", "cpx21", "cpx31", "cpx41", "cpx51",
252+
"cpx11", "cpx12", "cpx21", "cpx22", "cpx31", "cpx32", "cpx41", "cpx42", "cpx51", "cpx52", "cpx62",
252253
"cax11", "cax21", "cax31", "cax41",
253-
"ccx13", "ccx23", "ccx33", "ccx43", "ccx53", "ccx63"
254+
"ccx13", "ccx23", "ccx33", "ccx43", "ccx53", "ccx63",
255+
"cx22", "cx23", "cx32", "cx33", "cx42", "cx43", "cx52", "cx53"
254256
], var.worker_server_type)
255257
error_message = "Invalid worker server type."
256258
}
@@ -269,7 +271,7 @@ variable "worker_nodes" {
269271
default = []
270272
description = <<EOF
271273
List of worker node configurations. Each object defines a group of worker nodes with the same configuration.
272-
- type: Server type (cx11, cx21, cx22, cx31, cx32, cx41, cx42, cx51, cx52, cpx11, cpx21, cpx31, cpx41, cpx51, cax11, cax21, cax31, cax41, ccx13, ccx23, ccx33, ccx43, ccx53, ccx63)
274+
- type: Server type (cpx11, cpx12, cpx21, cpx22, cpx31, cpx32, cpx41, cpx42, cpx51, cpx52, cpx62, cax11, cax21, cax31, cax41, ccx13, ccx23, ccx33, ccx43, ccx53, ccx63, cx22, cx23, cx32, cx33, cx42, cx43, cx52, cx53)
273275
- count: Number of nodes of this type
274276
- labels: Map of Kubernetes labels to apply to these nodes (default: {})
275277
- taints: List of Kubernetes taints to apply to these nodes (default: [])
@@ -297,10 +299,10 @@ variable "worker_nodes" {
297299
validation {
298300
condition = alltrue([
299301
for node in var.worker_nodes : contains([
300-
"cx11", "cx21", "cx22", "cx31", "cx32", "cx41", "cx42", "cx51", "cx52",
301-
"cpx11", "cpx21", "cpx31", "cpx41", "cpx51",
302+
"cpx11", "cpx12", "cpx21", "cpx22", "cpx31", "cpx32", "cpx41", "cpx42", "cpx51", "cpx52", "cpx62",
302303
"cax11", "cax21", "cax31", "cax41",
303-
"ccx13", "ccx23", "ccx33", "ccx43", "ccx53", "ccx63"
304+
"ccx13", "ccx23", "ccx33", "ccx43", "ccx53", "ccx63",
305+
"cx22", "cx23", "cx32", "cx33", "cx42", "cx43", "cx52", "cx53"
304306
], node.type)
305307
])
306308
error_message = "Invalid worker server type in worker_nodes."

0 commit comments

Comments
 (0)