forked from stuttgart-things/proxmox-vm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
196 lines (161 loc) · 4.32 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
variable "pve_cluster_node" {
default = false
type = string
description = "name of proxmox cluster node"
}
variable "pve_folder_path" {
default = false
type = string
description = "target (vm) folder path of proxmox virtual machine"
}
variable "pve_datastore" {
default = false
type = string
description = "name of proxmox datastore"
}
variable "pve_network" {
default = false
type = string
description = "name of proxmox network"
}
variable "vm_numa" {
default = true
type = bool
description = "enable numa for vm"
}
variable "vm_onboot" {
default = true
type = bool
description = "whether to have the VM startup after the PVE node starts"
}
variable "vm_firmware" {
default = "seabios"
type = string
description = "the firmware interface to use on the virtual machine. Can be one of bios or EFI. Default: bios"
}
variable "vm_os_type" {
default = "l26"
type = string
description = "the type of OS in the guest to allow Proxmox to enable optimizations for the appropriate guest OS"
}
variable "vm_count" {
default = 1
type = number
description = "count of vms"
validation {
condition = var.vm_count >= 1 && var.vm_count <= 5 && floor(var.vm_count) == var.vm_count
error_message = "Accepted values: 1-5."
}
}
variable "vm_name" {
default = false
type = string
description = "name of proxmox virtual machine"
}
variable "vm_guest_agent" {
default = 1
type = number
description = "QEMU Guest Agent configuration set 0 to disable 1 to enable"
}
variable "vm_notes" {
default = false
type = string
description = "notes of proxmox virtual machine shwon in UI"
}
variable "vm_template" {
default = false
type = string
description = "name of proxmox virtual machine template"
}
variable "vm_num_cpus" {
default = 2
type = number
description = "amount of cpus of the vm"
validation {
condition = contains([2, 4, 6, 8, 10, 12, 16], var.vm_num_cpus)
error_message = "Valid values for vm_num_cpus are (2, 4, 6, 8, 10, 12, 16)"
}
}
variable "vm_num_sockets" {
default = 1
type = number
description = "amount of sockets of the vm"
}
variable "vm_memory" {
default = 4096
type = number
description = "amount of memory of the vm"
validation {
condition = contains([1024, 2048, 4096, 8192], var.vm_memory)
error_message = "Valid values for vm_memory are (1024, 2048, 4096, 8192)"
}
}
variable "vm_disk_size" {
default = "32G"
description = "size of disk"
type = string
validation {
condition = contains(["20G", "32G", "64G", "96G", "128G", "196G", "256G"], var.vm_disk_size)
error_message = "Valid values for vm_disk_size are (20G, 32G, 64G, 96G, 128G, 196G, 256G)"
}
}
variable "vm_disk_type" {
default = "virtio"
type = string
description = "type of disk"
}
variable "vm_bootdisk" {
default = "virtio0"
type = string
description = "default boot disk"
}
variable "vm_storage_controller" {
default = "virtio-scsi-pci"
type = string
description = "storage controller to emulate"
}
variable "vm_network_type" {
default = "virtio"
type = string
description = "network card type"
}
variable "vm_ssh_user" {
default = ""
type = string
description = "Username of VM"
}
variable "vm_ssh_password" {
default = ""
type = string
description = "Password of VM user"
}
variable "vm_network_address0" {
default = "ip=dhcp"
type = string
description = "The first IP address to assign to the guest (set to ip=dhcp to get a ip output)"
}
variable "vm_macaddr" {
default = null
type = string
description = "Mac address of desired vm"
}
variable "pve_api_url" {
default = false
type = string
description = "url of proxmox api"
}
variable "pve_api_user" {
default = false
type = string
description = "username of proxmox api user"
}
variable "pve_api_password" {
default = false
type = string
description = "password of proxmox api user"
}
variable "pve_api_tls_verify" {
default = true
type = bool
description = "proxmox API disable check if cert is valid"
}