From 99cbd4b995d86bc4ed92c6006b437bf62a9ad9aa Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Sun, 19 Jul 2026 16:02:28 +0200 Subject: [PATCH] terraform proxmox: Make balloon size configurable --- terraform/busch/main.tf | 1 + terraform/busch/modules/proxmox-vm/main.tf | 2 +- terraform/busch/modules/proxmox-vm/variables.tf | 8 +++++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/terraform/busch/main.tf b/terraform/busch/main.tf index 966ec14..8020329 100644 --- a/terraform/busch/main.tf +++ b/terraform/busch/main.tf @@ -21,6 +21,7 @@ module "truenas" { target_node = "busch" vmid = 100 memory = 8192 + balloon = 8192 cpu_cores = 2 disk_storage = "local" disk_size = "32G" diff --git a/terraform/busch/modules/proxmox-vm/main.tf b/terraform/busch/modules/proxmox-vm/main.tf index 89ddcf3..3a848b1 100644 --- a/terraform/busch/modules/proxmox-vm/main.tf +++ b/terraform/busch/modules/proxmox-vm/main.tf @@ -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 diff --git a/terraform/busch/modules/proxmox-vm/variables.tf b/terraform/busch/modules/proxmox-vm/variables.tf index fe75fcd..e4ee41f 100644 --- a/terraform/busch/modules/proxmox-vm/variables.tf +++ b/terraform/busch/modules/proxmox-vm/variables.tf @@ -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