-
Notifications
You must be signed in to change notification settings - Fork 1
/
variables.tf
146 lines (125 loc) · 3.33 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
variable "pve_instance_name" {
description = "Name of the instance."
type = string
}
variable "pve_instance_description" {
description = "Description of the instance."
type = string
}
variable "vmid" {
description = "ID of the VM (must be unique)."
type = number
}
variable "clone" {
default = null
description = "Name of the template to clone (ignored when pxe_boot is true)."
type = string
}
variable "full_clone" {
default = null
description = "Create a full clone; if false, a linked clone will be created (ignored when pxe_boot is true)."
type = bool
}
variable "qemu_agent" {
default = 0
description = "Enable QEMU guest agent (must be installed in the template). Set to `1` to enable or `0` to disable."
type = number
}
variable "target_node" {
description = "Name of the node to assign the instance to."
type = string
}
variable "resource_pool" {
description = "Name of the resource pool the assign the instance to."
type = string
}
variable "hastate" {
default = null
description = "Requested HA state for the resource."
type = string
validation {
condition = anytrue([
var.hastate == "disabled",
var.hastate == "enabled",
var.hastate == "ignored",
var.hastate == "started",
var.hastate == "stopped",
var.hastate == null
])
error_message = "Must be one of 'disabled', 'enabled', 'ignored', 'started', 'stopped', or null (default)."
}
}
variable "hagroup" {
default = null
description = "The HA group identifier the resource belongs to."
type = string
}
variable "cpu" {
default = null
description = "The type of CPU to emulate in the guest."
type = string
}
variable "cores" {
description = "Number of cores to allocate."
type = number
}
variable "sockets" {
description = "Number of sockets to allocate."
type = number
}
variable "memory" {
description = "Amount of memory to allocate."
type = number
}
variable "pxe_boot" {
default = null
description = "Set PXE boot mode"
type = bool
}
variable "boot" {
default = "order=scsi0;net0"
description = "Boot order for the instance."
type = string
}
variable "onboot" {
default = null
description = "Whether to have the VM startup after the PVE node starts."
type = bool
}
variable "vm_state" {
default = "running"
description = "Desired power state of the VM."
type = string
}
variable "network_interfaces" {
description = "List of objects representing instance interface configuration."
type = list(object({
model = string
bridge = string
tag = number
macaddr = string
}))
}
variable "disks" {
description = "List of objects representing additional disks."
type = list(object({
discard = optional(bool)
emulatessd = optional(bool)
iothread = optional(bool)
size = optional(string)
slot = optional(string)
storage = string
type = string
}))
default = []
}
variable "os_type" {
default = null
description = "Type of OS for preprovisioning."
type = string
}
variable "cicustom" {
default = null
description = "Path(s) to cloud-init config files (ignored when pxe_boot is true)."
type = string
}