feat(vm): enable qemu-guest-agent and set stop_on_destroy
- Add `qemu-guest-agent` enable/start command to `user-data.yml.tftpl` to ensure the agent is active immediately after provisioning. - Set `stop_on_destroy = true` in the Proxmox VM resource definition to ensure graceful shutdown during Terraform destroy operations.
This commit is contained in:
@@ -24,10 +24,11 @@ locals {
|
||||
resource "proxmox_virtual_environment_vm" "vms" {
|
||||
for_each = var.virtual_machines
|
||||
|
||||
name = "${each.key}.${var.domain_suffix}"
|
||||
node_name = var.target_node
|
||||
tags = concat(["terraform-managed", "vm"], each.value.tags)
|
||||
on_boot = lookup(each.value, "on_boot", true)
|
||||
name = "${each.key}.${var.domain_suffix}"
|
||||
node_name = var.target_node
|
||||
tags = concat(["terraform-managed", "vm"], each.value.tags)
|
||||
on_boot = lookup(each.value, "on_boot", true)
|
||||
stop_on_destroy = true
|
||||
|
||||
# Configuration de l'agent QEMU
|
||||
agent {
|
||||
|
||||
Reference in New Issue
Block a user