terraform proxmox: Make balloon size configurable
This commit is contained in:
parent
ed36c6c304
commit
99cbd4b995
3 changed files with 9 additions and 2 deletions
|
|
@ -21,6 +21,7 @@ module "truenas" {
|
||||||
target_node = "busch"
|
target_node = "busch"
|
||||||
vmid = 100
|
vmid = 100
|
||||||
memory = 8192
|
memory = 8192
|
||||||
|
balloon = 8192
|
||||||
cpu_cores = 2
|
cpu_cores = 2
|
||||||
disk_storage = "local"
|
disk_storage = "local"
|
||||||
disk_size = "32G"
|
disk_size = "32G"
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ resource "proxmox_vm_qemu" "truenas" {
|
||||||
vmid = var.vmid
|
vmid = var.vmid
|
||||||
machine = length(var.mapped_pcie_devices) == 0 ? "pc" : "q35"
|
machine = length(var.mapped_pcie_devices) == 0 ? "pc" : "q35"
|
||||||
memory = var.memory
|
memory = var.memory
|
||||||
balloon = 1024
|
balloon = var.balloon
|
||||||
scsihw = "virtio-scsi-pci"
|
scsihw = "virtio-scsi-pci"
|
||||||
boot = "order=scsi0;ide0"
|
boot = "order=scsi0;ide0"
|
||||||
start_at_node_boot = true
|
start_at_node_boot = true
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,16 @@ variable "target_node" {
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "memory" {
|
variable "memory" {
|
||||||
description = "Memory to allocate for the VM"
|
description = "Memory to allocate for the VM in Megabytes"
|
||||||
type = string
|
type = string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "balloon" {
|
||||||
|
description = "The minimum amount of memory to allocate to the VM in Megabytes"
|
||||||
|
type = number
|
||||||
|
default = 1024
|
||||||
|
}
|
||||||
|
|
||||||
variable "cpu_cores" {
|
variable "cpu_cores" {
|
||||||
description = "Number of CPU cores to allocate for the VM"
|
description = "Number of CPU cores to allocate for the VM"
|
||||||
type = number
|
type = number
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue