terraform proxmox: Make balloon size configurable

This commit is contained in:
JuliusFreudenberger 2026-07-19 16:02:28 +02:00
parent ed36c6c304
commit 99cbd4b995
3 changed files with 9 additions and 2 deletions

View file

@ -21,6 +21,7 @@ module "truenas" {
target_node = "busch"
vmid = 100
memory = 8192
balloon = 8192
cpu_cores = 2
disk_storage = "local"
disk_size = "32G"

View file

@ -14,7 +14,7 @@ resource "proxmox_vm_qemu" "truenas" {
vmid = var.vmid
machine = length(var.mapped_pcie_devices) == 0 ? "pc" : "q35"
memory = var.memory
balloon = 1024
balloon = var.balloon
scsihw = "virtio-scsi-pci"
boot = "order=scsi0;ide0"
start_at_node_boot = true

View file

@ -21,10 +21,16 @@ variable "target_node" {
}
variable "memory" {
description = "Memory to allocate for the VM"
description = "Memory to allocate for the VM in Megabytes"
type = string
}
variable "balloon" {
description = "The minimum amount of memory to allocate to the VM in Megabytes"
type = number
default = 1024
}
variable "cpu_cores" {
description = "Number of CPU cores to allocate for the VM"
type = number