proxmox_vm |
Map containing VM configurations. Key = unique VM name. Each VM object must contain the following attributes: - vm_id: Unique VM ID in the Proxmox cluster (integer) - hostname: Hostname of the VM (string) - ciuser: Cloud-Init username (string) - cipassword: Cloud-Init password (string, must not be empty) - memory: Amount of RAM in MB (integer) - boot_disk_size: Size of the boot disk (e.g. "10G") (string) - cidr: IP address and subnet in CIDR notation (e.g. "192.168.1.10/24") (string) - NAT_gateway_IPv4: Default IPv4 gateway (string) - vnic_bridge: Proxmox network bridge (e.g. "vmbr0") (string) - tags: (optional) List of tags (list(string)) All other attributes are documented below. |
map(object({ # --- Basic info --- vm_id = number # Unique VM ID in the Proxmox cluster hostname = string # Hostname of the VM description = optional(string, "Do not touch this VM, it is managed by Terraform!") # Optional description (default: "Do not touch this VM, it is managed by Terraform!") target_node = string # Target Proxmox node name
# --- Cloud-Init config --- ciuser = string # Cloud-Init username cipassword = string img_template = optional(string, "packer-ubuntu2404") # Cloud init template (default: packer-ubuntu2404)I full_clone = optional(bool, "true") # The base VM name from which to clone to create the new VM (default: true) cloud_init_storage = optional(string, "local") # Cloud init storag (default: local)
# --- CPU config --- cpu_cores = number # Number of CPU cores cpu_affinity = optional(string, "") # Optional CPU affinity mask (default: "" <- no affinity) cpu_limit = optional(number, 0) # CPU usage limit (0 = no limit) cpu_type = optional(string, "host") # CPU type (e.g. "host", "qemu64") cpu_numa = optional(bool, false) # NUMA support enabled (default: true) cpu_sockets = optional(number, 1) # Number of CPU sockets cpu_units = optional(number, 0) # CPU units (0 = default) cpu_vcores = optional(number, 0) # Number of virtual CPU cores (default: 0)
# --- Memory config --- memory = number # Amount of RAM in MB balloon = optional(number, 2048) # Minimum memory with ballooning (default: 2048 MB)
# --- Disk config --- boot_disk_size = string # Size of the boot disk (e.g. "20G") boot_disk_storage = optional(string, "local") # Storage backend for the boot disk boot_disk_iothread = optional(bool, false) # Enable I/O thread for the boot disk (default: false) boot_disk_ssd = optional(bool) # Mark boot disk as SSD boot_disk_discard = optional(bool, false) # Enable discard/TRIM for the boot disk (default: false) boot_disk_cache = optional(string, "writeback") # The drive’s cache mode. Options: directsync, none, unsafe, writeback, writethrough. (default: writeback)
# --- Network config --- cidr = string # IP address with subnet in CIDR notation NAT_gateway_IPv4 = optional(string, "192.168.1.1") # Default IPv4 gateway vnic_bridge = optional(string, "vmbr0") # Proxmox network bridge (e.g. vmbr0) skip_ipv6 = optional(bool, true) # Tells proxmox that acquiring an IPv6 address from the qemu guest agent isn't required, it will still return an ipv6 address if it could obtain one. Useful for reducing retries in environments without ipv6. (default: true)
# --- Misc --- tags = optional(list(string), []) # Tags for the VM (default: empty list) onboot = optional(bool, true) # "Whether the VM should automatically start when the Proxmox node boots (default: true) vm_state = optional(string, "started") boot_at_pve_start = optional(bool, true) # Start VM on Proxmox start (default: true) agent = optional(number, 1) # Set to 1 to enable the QEMU Guest Agent. Note, you must run the qemu-guest-agent daemon in the guest for this to have any effect. (default: 1)
# --- Cloud-Init DNS --- dns_searchdomain = optional(string, "fritz.box") # DNS search domain (default: fritz.box) dns_nameserver = optional(string, "192.168.1.119") # DNS nameserver (default: 192.168.1.119)
# --- Upgrade --- ciupgrade = optional(bool, true) # Upgrade packages on boot (default: true) })) |
n/a |
yes |