/
variables.tf
172 lines (143 loc) · 4.13 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
variable "target_node" {
description = "The name of the Proxmox Node on which to place the VM"
type = string
default = "pve"
}
variable "pool" {
description = "The destination resource pool for the new VM"
type = string
default = null
}
variable "name_prefix" {
description = "Creates a name beginning with the specified prefix"
type = string
}
variable "connection" {
description = "Provisioner connection settings"
type = map(string)
sensitive = true
default = {
type = "ssh"
agent = true
}
}
variable "k3s_version" {
description = "Specify the k3s version. You can choose from the following release channels or pin the version directly"
type = string
default = "latest"
}
variable "kubeconfig_output_path" {
description = "Where to save the Kubectl config file (if `write_kubeconfig = true`). Assumed to be a directory if the value ends with a forward slash `/`."
type = string
default = "./"
}
variable "kubeconfig_file_permission" {
description = "File permission of the Kubectl config file containing cluster configuration saved to `kubeconfig_output_path.`"
type = string
default = "0600"
}
variable "write_kubeconfig" {
description = "Whether to write a Kubectl config file containing the cluster configuration. Saved to `kubeconfig_output_path`."
type = bool
default = true
}
#####################################################
# VM Qemu Resource
#####################################################
variable "clone" {
description = "The base VM from which to clone to create the new VM"
type = string
}
variable "numa" {
description = "Whether to enable Non-Uniform Memory Access in the guest"
type = bool
default = false
}
variable "ciuser" {
description = "Override the default cloud-init user for provisioning"
type = string
}
variable "cipassword" {
description = "Override the default cloud-init user's password"
type = string
sensitive = true
default = null
}
variable "searchdomain" {
description = "Sets default DNS search domain suffix"
type = string
default = null
}
variable "nameserver" {
description = "Sets default DNS server for guest"
type = string
default = null
}
variable "sshkeys" {
description = "Newline delimited list of SSH public keys to add to authorized keys file for the cloud-init user"
type = string
}
############################
# K3S Server
############################
variable "server_count" {
description = "The number of K3S server nodes to create"
type = number
}
variable "server_cores" {
description = "The number of CPU cores per CPU socket to allocate to the VM"
type = number
default = 1
}
variable "server_sockets" {
description = "The number of CPU sockets to allocate to the VM"
type = number
default = 1
}
variable "server_memory" {
description = "The amount of memory to allocate to the VM in Megabytes"
type = number
default = 512
}
variable "server_disks" {
description = "VM disk config"
type = list(map(string))
default = [{}]
}
variable "server_networks" {
description = "VM network adapter config"
type = list(map(string))
default = [{}]
}
############################
# K3S Agent
############################
variable "agent_count" {
description = "The number of K3S agent nodes to create"
type = number
}
variable "agent_cores" {
description = "The number of CPU cores per CPU socket to allocate to the VM"
type = number
default = 1
}
variable "agent_sockets" {
description = "The number of CPU sockets to allocate to the VM"
type = number
default = 1
}
variable "agent_memory" {
description = "The amount of memory to allocate to the VM in Megabytes"
type = number
default = 512
}
variable "agent_disks" {
description = "VM disk config"
type = list(map(string))
default = [{}]
}
variable "agent_networks" {
description = "VM network adapter config"
type = list(map(string))
default = [{}]
}