added variables

This commit is contained in:
2026-03-07 21:53:56 -06:00
parent 920ea80261
commit db67f71a3c
2 changed files with 25 additions and 1 deletions

View File

@@ -64,7 +64,7 @@ resource "proxmox_virtual_environment_vm" "vm" {
# VM stays STOPPED after clone. # VM stays STOPPED after clone.
# n8n handles: DHCP reservation → HA affinity rule → VM start # n8n handles: DHCP reservation → HA affinity rule → VM start
# This ensures DHCP is in place before first boot. # This ensures DHCP is in place before first boot.
started = false started = var.started
# QEMU guest agent is installed in template (via Packer). # QEMU guest agent is installed in template (via Packer).
# Note: Proxmox 9 requires VM.GuestAgent.Audit privilege on the API token. # Note: Proxmox 9 requires VM.GuestAgent.Audit privilege on the API token.

View File

@@ -91,3 +91,27 @@ variable "bridge" {
description = "Proxmox network bridge for the VM." description = "Proxmox network bridge for the VM."
default = "vmbr0" default = "vmbr0"
} }
variable "started" {
type = bool
description = "Whether to start the VM after creation. Pipeline sets false (n8n handles start); manual bootstrap sets true."
default = false
}
variable "use_dhcp" {
type = bool
description = "Use DHCP (pipeline mode) or static IP (bootstrap mode)."
default = true
}
variable "subnet_mask" {
type = number
description = "Subnet mask in CIDR notation (e.g., 24). Only used when use_dhcp = false."
default = 24
}
variable "gateway" {
type = string
description = "Default gateway. Only used when use_dhcp = false."
default = "10.1.71.1"
}