-
Notifications
You must be signed in to change notification settings - Fork 8
/
00-variables.tf
145 lines (124 loc) · 4.52 KB
/
00-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
variable "cluster_name" {
description = "Name of cluster"
type = string
}
variable "cluster_id" {
default = "1"
description = "The ID of the cluster."
type = number
}
variable "cluster_architecture" {
default = "amd64"
description = "Cluster architecture. Choose 'arm64' or 'amd64'. If you choose 'arm64', ensure to also override the control_plane.instance_type and worker_groups.instance_type with an ARM64-based instance type like 'm7g.large'."
type = string
validation {
condition = can(regex("^a(rm|md)64$", var.cluster_architecture))
error_message = "The cluster_architecture value must be a valid architecture. Allowed values are 'arm64' and 'amd64'."
}
}
variable "region" {
description = "The region in which to create the Talos Linux cluster."
type = string
}
variable "tags" {
description = "The set of tags to place on the cluster."
type = map(string)
}
variable "allocate_node_cidrs" {
default = true
description = "Whether to assign PodCIDRs to Node resources or not. Only needed in case Cilium runs in 'kubernetes' IPAM mode."
type = bool
}
variable "pod_cidr" {
default = "100.64.0.0/14"
description = "The CIDR to use for Pods. Only required in case allocate_node_cidrs is set to 'true'. Otherwise, simply configure it inside Cilium's Helm values."
type = string
}
variable "service_cidr" {
default = "100.68.0.0/16"
description = "The CIDR to use for services."
type = string
}
variable "disable_kube_proxy" {
default = true
description = "Whether to deploy Kube-Proxy or not. By default, KP shouldn't be deployed."
type = bool
}
variable "allow_workload_on_cp_nodes" {
default = false
description = "Allow workloads on CP nodes or not. Allowing it means Talos Linux default taints are removed from CP nodes. More details here: https://www.talos.dev/v1.5/talos-guides/howto/workers-on-controlplane/"
type = bool
}
variable "talos_version" {
default = "v1.8.0"
description = "Talos version to use for the cluster, if not set, the newest Talos version. Check https://github.com/siderolabs/talos/releases for available releases."
type = string
validation {
condition = can(regex("^v\\d+\\.\\d+\\.\\d+$", var.talos_version))
error_message = "The talos_version value must be a valid Talos patch version, starting with 'v'."
}
}
variable "kubernetes_version" {
default = ""
description = "Kubernetes version to use for the Talos cluster, if not set, the K8s version shipped with the selected Talos version will be used. Check https://www.talos.dev/latest/introduction/support-matrix/. For example '1.29.3'."
type = string
validation {
condition = can(regex("^\\d+\\.\\d+\\.\\d+$", var.kubernetes_version))
error_message = "The kubernetes_version value must be a valid Kubernetes patch version."
}
}
variable "controlplane_count" {
default = 3
description = "Defines how many controlplane nodes are deployed in the cluster."
type = number
}
variable "workers_count" {
default = 2
description = "Defines how many worker nodes are deployed in the cluster."
type = number
}
variable "control_plane" {
default = {}
description = "Info for control plane that will be created"
type = object({
instance_type = optional(string, "m5.large")
config_patch_files = optional(list(string), [])
tags = optional(map(string), {})
})
}
variable "worker_groups" {
default = [{
name = "default"
}]
description = "List of node worker node groups to create"
type = list(object({
name = string
instance_type = optional(string, "m5.large")
config_patch_files = optional(list(string), [])
tags = optional(map(string), {})
}))
}
variable "vpc_id" {
description = "ID of the VPC where to place the VMs."
type = string
}
variable "vpc_cidr" {
default = "10.0.0.0/16"
description = "The IPv4 CIDR block for the VPC."
type = string
}
variable "talos_api_allowed_cidr" {
default = "0.0.0.0/0"
description = "The CIDR from which to allow to access the Talos API"
type = string
}
variable "kubernetes_api_allowed_cidr" {
default = "0.0.0.0/0"
description = "The CIDR from which to allow to access the Kubernetes API"
type = string
}
variable "config_patch_files" {
default = []
description = "Path to talos config path files that applies to all nodes"
type = list(string)
}