-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
373 lines (329 loc) · 10 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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
variable "dtc-description" {
type = string
description = "Description of the datacenter."
default = ""
}
variable "ui-language" {
type = string
description = "Language for the PVE user interface."
default = "en"
validation {
condition = can(regex("^(ca|da|de|en|es|eu|fa|fr|he|it|ja|nb|nn|pl|pt_BR|ru|sl|sv|tr|zh_CN|zh_TW)$", var.ui-language))
error_message = "Proxmox VE ui currently supports only the following languages: ca, da, de, en, es, eu, fa, fr, he, it, ja, nb, nn, pl, pt_BR, ru, sl, sv, tr, zh_CN, zh_TW!"
}
}
variable "vnc-kb-layout" {
type = string
description = "Keyboard layout for vnc server."
default = "en-us"
validation {
condition = can(regex("^(de|de-ch|da|en-gb|en-us|es|fi|fr|fr-be|fr-ca|fr-ch|hu|is|it|ja|lt|mk|nl|no|pl|pt|pt-br|sv|sl|tr)$", var.vnc-kb-layout))
error_message = "Proxmox VE vnc server currently supports only the following keyboard layouts: de, de-ch, da, en-gb, en-us, es, fi, fr, fr-be, fr-ca, fr-ch, hu, is, it, ja, lt, mk, nl, no, pl, pt, pt-br, sv, sl, tr"
}
}
variable "http-proxy" {
type = string
description = "HTTP proxy to be used for downloads. (e.g. 'http://username:password@host:port/')"
default = null
}
variable "dtc-console-viewer" {
type = string
description = "Default console viewer."
default = "xtermjs"
validation {
condition = can(regex("^(applet|vv|html5|xtermjs)$", var.dtc-console-viewer))
error_message = "Proxmox VE currently supports only the following console viewers: applet, vv, html5, xtermjs!"
}
}
variable "dtc-email" {
type = string
description = "Email address to send notifications from the datacenter."
default = null
}
variable "dtc-mac-prefix" {
type = string
description = "Prefix for autogenerated MAC addresses of virtual guests."
default = "BC:24:11"
}
variable "dtc-migration-type" {
type = string
description = "Migration traffic is encrypted using an SSH tunnel by default. On secure, completely private networks this can be disabled to increase performance."
default = "secure"
validation {
condition = can(regex("^(secure|insecure)$", var.dtc-migration-type))
error_message = "Migration type can be either secure or insecure!"
}
}
variable "dtc-migration-cidr" {
type = string
description = "CIDR range for migration traffic."
default = null
}
variable "dtc-ha-policy" {
type = string
description = "Describes the policy for handling HA services on poweroff or reboot of a node."
default = "conditional"
validation {
condition = can(regex("^(conditional|failover|freeze|migrate)$", var.dtc-ha-policy))
error_message = "HA policy can be either conditional, failover, freeze or migrate!"
}
}
variable "dtc-crs" {
type = object({
ha = string
ha-rebalance = bool
})
description = "Cluster resource scheduling settings."
default = {
ha = "basic"
ha-rebalance = false
}
}
variable "dtc-bw-limits" {
type = object({
default = optional(number)
restore = optional(number)
migration = optional(number)
clone = optional(number)
move = optional(number)
})
description = "Set I/O bandwidth limit for various operations (in KiB/s)."
default = {}
}
variable "dtc-max-workers" {
type = number
description = "Defines how many workers (per node) are maximal started on actions like stopall VMs or task from the ha-manager."
default = 5
}
variable "dtc-vmid-range" {
type = object({
lower = number
upper = number
})
description = "Control the range for the free VMID auto-selection pool."
default = {
lower = 1000
upper = 1000000
}
}
variable "dtc-fw-enabled" {
type = bool
description = "Enable firewall at datacenter level."
default = true
}
variable "dtc-fw-ebtables" {
type = bool
description = "Enable ebtables at datacenter level."
default = true
}
variable "dtc-fw-inpol" {
type = string
description = "Datacenter level firewall input policy."
default = "DROP"
}
variable "dtc-fw-outpol" {
type = string
description = "Datacenter level firewall output policy."
default = "ACCEPT"
}
variable "dtc-fw-lrl" {
type = object({
enabled = optional(bool)
burst = optional(number)
rate = optional(string)
})
description = "Datacenter level fw log rate limit configuration."
default = {
enabled = false
}
}
variable "dtc-fsg" {
type = map(object({
comment = optional(string)
rules = list(object({
enabled = optional(bool)
iface = optional(string)
action = string
direction = string
sourceip = optional(string)
destip = optional(string)
sport = optional(string)
dport = optional(string)
proto = optional(string)
log = optional(string)
comment = optional(string)
}))
}))
description = "Datacenter level firewall security groups."
default = {}
}
variable "dtc-fw-rules" {
type = map(object({
enabled = optional(bool)
iface = optional(string)
action = string
direction = string
sourceip = optional(string)
destip = optional(string)
sport = optional(string)
dport = optional(string)
proto = optional(string)
log = optional(string)
comment = optional(string)
}))
description = "Datacenter level firewall rules."
default = {}
}
variable "dtc-fw-fsg" {
type = map(object({
enabled = optional(bool)
fsg = string
iface = optional(string)
comment = optional(string)
}))
description = "Datacenter level firewall rules that import from a security group."
default = {}
}
variable "dtc-pools" {
type = map(string)
description = "Pools for resources."
default = {}
}
variable "node-name" {
type = string
description = "Name of the Proxmox VE node."
default = null
}
variable "node-timezone" {
type = string
description = "Timezone of the Proxmox VE node."
default = "UTC"
}
variable "node-dns" {
type = object({
search-domain = string
servers = optional(list(string))
})
description = "PVE node DNS settings."
default = null
}
variable "node-hosts-entries" {
type = map(object({
address = string
hostnames = list(string)
}))
description = "PVE node /etc/hosts entries."
default = {}
}
variable "node-bridges" {
type = map(object({
autostart = optional(bool)
comment = optional(string)
ipv4-cidr = optional(string)
ipv4-gw = optional(string)
ipv6-cidr = optional(string)
ipv6-gw = optional(string)
mtu = optional(number)
bridged-ports = optional(list(string))
vlan_aware = optional(bool)
}))
description = "PVE node Linux network bridges."
default = {}
}
variable "run-bootstrap" {
type = bool
description = "Run bootstrap script on PVE node to configure settings missing (as of yet) in the provider."
default = false
}
variable "node-ip" {
type = string
description = "IP address of the Proxmox VE node."
validation {
condition = var.node-ip == null || can(regex("^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}$", var.node-ip))
error_message = "Invalid IP address!"
}
nullable = true
default = null
}
variable "node-ssh-user" {
type = string
description = "Username for the Proxmox VE node ssh connection."
default = null
}
variable "node-ssh-pw" {
type = string
description = "Password for the Proxmox VE node ssh connection."
default = null
}
variable "node-ssh-privkey" {
type = string
description = "Private key for the Proxmox VE node ssh connection."
default = null
}
variable "dtc-tag" {
type = object({
case = optional(number)
order = optional(string)
shape = optional(string)
})
description = "[case=<1|0>], [order=<config|alphabetical>], [shape=full|circle|dense|none]"
default = {
order = "config"
}
}
variable "node-fw-enabled" {
type = bool
description = "Enable firewall at node level."
default = true
}
variable "node-fw-log-in" {
type = string
description = "Log level for incoming packets."
default = "nolog"
validation {
condition = can(regex("^(emerg|alert|crit|err|warning|notice|info|debug|nolog)$", var.node-fw-log-in))
error_message = "Log level can be one of: emerg, alert, crit, err, warning, notice, info, debug, nolog!"
}
}
variable "node-fw-log-out" {
type = string
description = "Log level for outgoing packets."
default = "nolog"
validation {
condition = can(regex("^(emerg|alert|crit|err|warning|notice|info|debug|nolog)$", var.node-fw-log-out))
error_message = "Log level can be one of: emerg, alert, crit, err, warning, notice, info, debug, nolog!"
}
}
variable "node-fw-smurfs" {
type = bool
description = "Enable SMURFS protection at node level."
default = true
}
variable "node-fw-smurfs-log" {
type = string
description = "Log level for SMURFS packets."
default = "nolog"
validation {
condition = can(regex("^(emerg|alert|crit|err|warning|notice|info|debug|nolog)$", var.node-fw-smurfs-log))
error_message = "Log level can be one of: emerg, alert, crit, err, warning, notice, info, debug, nolog!"
}
}
variable "node-fw-tcpflags" {
type = bool
description = "Enable TCP flags filtering at node level."
default = false
}
variable "node-fw-tcpflags-log" {
type = string
description = "Log level for TCP flags packets."
default = "nolog"
validation {
condition = can(regex("^(emerg|alert|crit|err|warning|notice|info|debug|nolog)$", var.node-fw-tcpflags-log))
error_message = "Log level can be one of: emerg, alert, crit, err, warning, notice, info, debug, nolog!"
}
}
variable "node-fw-ndp" {
type = bool
description = "Enable NDP filtering at node level."
default = false
}