diff --git a/modules/proxmox/vm-clone/main.tf b/modules/proxmox/vm-clone/main.tf index dd232d6..1383404 100644 --- a/modules/proxmox/vm-clone/main.tf +++ b/modules/proxmox/vm-clone/main.tf @@ -33,6 +33,8 @@ resource "proxmox_vm_qemu" "vm" { boot = "order=virtio0;ide2;net0" bootdisk = "virtio0" agent = var.agent_enabled + onboot = var.onboot + oncreate = var.oncreate clone = var.clone full_clone = var.full_clone diff --git a/modules/proxmox/vm-clone/variables.tf b/modules/proxmox/vm-clone/variables.tf index e2bc485..5a63c47 100644 --- a/modules/proxmox/vm-clone/variables.tf +++ b/modules/proxmox/vm-clone/variables.tf @@ -64,3 +64,15 @@ variable "tags" { type = string default = null } + +variable "onboot" { + description = "Whether to have the VM startup after the PVE node starts." + type = bool + default = true +} + +variable "oncreate" { + description = "Whether to have the VM startup after the VM is created." + type = bool + default = true +}