From 8517f303674deb157ce99cd92355041eccd86b9a Mon Sep 17 00:00:00 2001 From: William <3422794+FriedCircuits@users.noreply.github.com> Date: Sun, 12 Dec 2021 04:00:07 +0000 Subject: [PATCH] Add vars for oncreate and onboot --- modules/proxmox/vm-clone/main.tf | 2 ++ modules/proxmox/vm-clone/variables.tf | 12 ++++++++++++ 2 files changed, 14 insertions(+) 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 +}