homelab/infrastructure/proxmox/modules/nixos-vm/variables.tf
plasmagoat 0347f4d325
Some checks failed
Test / tests (push) Has been cancelled
/ OpenTofu (push) Successful in 9s
infra
2025-07-21 22:41:08 +02:00

133 lines
2.9 KiB
HCL

variable "vmid" {
description = "The VM ID of the Proxmox VM."
type = number
}
variable "name" {
description = "The name of the Proxmox VM."
type = string
}
variable "target_node" {
description = "The Proxmox node to provision the VM on."
type = string
}
variable "agent" {
description = "Enable QEMU Guest Agent (1 for enabled, 0 for disabled)."
type = number
default = 1
}
variable "cpu_cores" {
description = "Number of CPU cores for the VM."
type = number
default = 2
}
variable "memory" {
description = "Memory in MB for the VM."
type = number
default = 1024
}
variable "boot" {
description = "Boot order for the VM (e.g., 'order=scsi0')."
type = string
default = " " # Proxmox expects a space for default if not specified
}
variable "clone_id" {
description = "The VM ID of the template to clone from."
type = number
default = 9000
}
variable "full_clone" {
description = "Whether to perform a full clone or linked clone."
type = bool
default = true
}
variable "scsihw" {
description = "SCSI controller hardware type."
type = string
default = "virtio-scsi-single"
}
variable "vm_state" {
description = "Desired state of the VM ('running', 'stopped', etc.)."
type = string
default = "running"
}
variable "automatic_reboot" {
description = "Automatically reboot the VM on configuration changes."
type = bool
default = true
}
variable "ciupgrade" {
description = "Upgrade Cloud-Init tools on first boot."
type = bool
default = true
}
variable "ipconfig0" {
description = "Cloud-Init IP configuration for network interface 0."
type = string
default = "ip=dhcp"
}
variable "skip_ipv6" {
description = "Skip IPv6 configuration for Cloud-Init."
type = bool
default = true
}
variable "ciuser" {
description = "Cloud-Init user for the VM."
type = string
default = "root"
}
variable "cipassword" {
description = "Cloud-Init password for the VM."
type = string
default = "Enter123!"
}
variable "sshkeys" {
description = "Public SSH key(s) to be added to the VM."
type = string
}
variable "disk_storage" {
description = "Storage for the primary OS disk."
type = string
default = "pv1"
}
variable "disk_size" {
description = "Size of the primary OS disk (e.g., '5G')."
type = string
default = "5G"
}
variable "cloudinit_storage" {
description = "Storage for the Cloud-Init disk."
type = string
default = "local-lvm"
}
variable "network_bridge" {
description = "Bridge for the network interface."
type = string
default = "vmbr0"
}
variable "network_model" {
description = "Model for the network interface."
type = string
default = "virtio"
}