-
Notifications
You must be signed in to change notification settings - Fork 2
/
variables.tf
executable file
·80 lines (78 loc) · 2.12 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
## TODO: Match a variable object to the proxmox_defaults for better management and customisability
variable "proxmox_vms" {
description = "Proxmox VMs to be provisioned"
type = list(object({
name = string
id = number
ipconfig = string
target_node = optional(string)
clone_override = optional(bool)
full_clone = optional(bool)
os = optional(string)
cores = optional(number)
sockets = optional(number)
memory = optional(number)
hotplug = optional(string)
scsihw = optional(string)
sshkeys = optional(string)
network_configuration = list(object({
model = string
bridge = string
}))
disk_configuration = list(object({
type = string
storage = string
size = string
}))
}))
default = []
}
## TODO: Remove default choices; require user to configure all options
variable "proxmox_defaults" {
description = "Default Proxmox Configurations for Simplicity of Deployment"
type = object({
cores = number
sockets = number
memory = number
hotplug = string
proxmox_clone = string
disk_configuration = list(object({
type = string
storage = string
size = string
}))
network_configuration = list(object({
model = string
bridge = string
}))
os = string
target_node = string
})
default = {
cores = 1
sockets = 1
memory = 2048
hotplug = "network,disk,cpu,memory"
proxmox_clone = "debian-12-infra-compute-template"
disk_configuration = [
{
type = "virtio"
storage = "local-btrfs"
size = "50G"
}
]
network_configuration = [
{
model = "virtio"
bridge = "vmbr0"
}
]
os = "debian"
target_node = "compute-1"
}
}
variable "proxmox_ssh" {
description = "SSH Keys to provision on the VM"
type = string
default = ""
}