bpg / terraform-provider-proxmox

Terraform Provider for Proxmox
https://registry.terraform.io/providers/bpg/proxmox
Mozilla Public License 2.0
742 stars 125 forks source link

Selection of the components you want to be hotpluggable #1341

Open Luquor opened 2 months ago

Luquor commented 2 months ago

``Is your feature request related to a problem? Please describe. There might be a way to do this that I am not aware of ! When I want a VM to have RAM and CPU with hotplug, just RAM and CPU, I need to instantiate them by using Terraform, and then go in Proxmox UI and check RAM/CPU, than reboot. It is now viable to do this if I have to instantiate hundreds of VMs.

Describe the solution you'd like Add an array in the resource block NUMA that let me choose which components I want to have hotplug enabled on. Or having a new resources that let us configure the file /etc/pve/qemu-server/100.conf for example.

Additional context This is one resource that instantiate one VM, I have hundreds of them. I cannot just choose which component to hotplug.

resource "proxmox_virtual_environment_vm" "master_vm" {
  name = "base-bookworm-web-inf-ncy"
  tags = ["bookworm", "prod", "terraform"]

  node_name = var.resourcehost_name
  vm_id     = 100

  clone {
    vm_id = data.proxmox_virtual_environment_vm.template.id
    node_name = var.template_resourcehost
    datastore_id = "local-data"
  }

  cpu {
    cores = 4
    numa = true
    type = "host"
  }

  memory {
    dedicated = 3072
  }

  disk {
    datastore_id = "local-data"
    interface = "scsi0"
    size      = 25
  }
}
bpg commented 2 months ago

Duplicates #987