-
Notifications
You must be signed in to change notification settings - Fork 8
/
variables.tf
115 lines (100 loc) · 2.93 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
# see https://github.com/siderolabs/talos/releases
# see https://www.talos.dev/v1.8/introduction/support-matrix/
variable "talos_version" {
type = string
# renovate: datasource=github-releases depName=siderolabs/talos
default = "1.8.3"
validation {
condition = can(regex("^\\d+(\\.\\d+)+", var.talos_version))
error_message = "Must be a version number."
}
}
# see https://github.com/siderolabs/kubelet/pkgs/container/kubelet
# see https://www.talos.dev/v1.8/introduction/support-matrix/
variable "kubernetes_version" {
type = string
# renovate: datasource=github-releases depName=siderolabs/kubelet
default = "1.31.2"
validation {
condition = can(regex("^\\d+(\\.\\d+)+", var.kubernetes_version))
error_message = "Must be a version number."
}
}
variable "cluster_name" {
description = "A name to provide for the Talos cluster"
type = string
default = "example"
}
variable "cluster_vip" {
description = "A name to provide for the Talos cluster"
type = string
default = "10.17.3.9"
}
variable "cluster_endpoint" {
description = "The k8s api-server (VIP) endpoint"
type = string
default = "https://10.17.3.9:6443" # k8s api-server endpoint.
}
variable "cluster_node_network" {
description = "The IP network of the cluster nodes"
type = string
default = "10.17.3.0/24"
}
variable "cluster_node_network_first_controller_hostnum" {
description = "The hostnum of the first controller host"
type = number
default = 80
}
variable "cluster_node_network_first_worker_hostnum" {
description = "The hostnum of the first worker host"
type = number
default = 90
}
variable "cluster_node_network_load_balancer_first_hostnum" {
description = "The hostnum of the first load balancer host"
type = number
default = 130
}
variable "cluster_node_network_load_balancer_last_hostnum" {
description = "The hostnum of the last load balancer host"
type = number
default = 230
}
variable "cluster_node_domain" {
description = "the DNS domain of the cluster nodes"
type = string
default = "talos.test"
}
variable "ingress_domain" {
description = "the DNS domain of the ingress resources"
type = string
default = "example.test"
}
variable "controller_count" {
type = number
default = 1
validation {
condition = var.controller_count >= 1
error_message = "Must be 1 or more."
}
}
variable "worker_count" {
type = number
default = 1
validation {
condition = var.worker_count >= 1
error_message = "Must be 1 or more."
}
}
variable "talos_libvirt_base_volume_name" {
type = string
default = "talos-1.8.3.qcow2"
validation {
condition = can(regex(".+\\.qcow2+$", var.talos_libvirt_base_volume_name))
error_message = "Must be a name with a .qcow2 extension."
}
}
variable "prefix" {
type = string
default = "terraform_talos_example"
}