-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables.tf
More file actions
103 lines (90 loc) · 3.18 KB
/
Copy pathvariables.tf
File metadata and controls
103 lines (90 loc) · 3.18 KB
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
variable "proxmox" {
description = "Proxmox API and default infrastructure settings."
type = object({
endpoint = string
insecure = optional(bool, false)
username = string
cluster_name = optional(string)
node_default = string
image_datastore = string
vm_datastore = string
initialization_datastore = optional(string)
network_bridge = string
vlan_id = optional(number)
tags = optional(list(string), [])
})
}
variable "proxmox_password" {
description = "Proxmox API password supplied via environment or prompt."
type = string
sensitive = true
}
variable "cluster" {
description = "Talos cluster settings shared by all nodes."
type = object({
name = string
gateway = string
prefix = number
dns_domain = optional(string, "cluster.local")
nameservers = optional(list(string), [])
talos_version = string
kubernetes_version = optional(string)
api_vip = optional(string)
install_disk = string
network_interface = optional(string, "eth0")
additional_sans = optional(list(string), [])
})
}
variable "image" {
description = "Talos Image Factory inputs."
type = object({
schematic_id = optional(string)
schematic_file = optional(string)
factory_base_url = optional(string, "https://factory.talos.dev")
arch = optional(string, "amd64")
platform = optional(string, "nocloud")
update_strategy = optional(string, "recreate")
extensions = optional(list(string), [])
})
default = {}
}
variable "addons" {
description = "Optional cluster add-ons."
type = object({
cilium_enabled = optional(bool, true)
cilium_chart_version = optional(string, "1.19.1")
load_balancer_ip_pools = optional(list(string), [])
cilium_lb_pool_name = optional(string, "default")
cilium_l2_policy_name = optional(string, "default-l2")
traefik_enabled = optional(bool, false)
traefik_chart_version = optional(string, "39.0.7")
proxmox_csi_enabled = optional(bool, false)
proxmox_csi_chart_version = optional(string, "0.18.0")
proxmox_csi_storage = optional(string, "")
})
default = {}
}
variable "nodes" {
description = "Talos VM definitions keyed by node name."
type = map(object({
role = string
host_node = optional(string)
vm_id = number
ip = string
cpu = number
memory_mb = number
disk_gb = number
datastore_id = optional(string)
bridge = optional(string)
vlan_id = optional(number)
network_interface = optional(string)
start_on_boot = optional(bool, true)
tags = optional(list(string), [])
}))
validation {
condition = alltrue([
for _, node in var.nodes : contains(["controlplane", "worker"], node.role)
])
error_message = "nodes[*].role must be either controlplane or worker."
}
}