resource "proxmox_virtual_environment_vm" "nodes" { count = 2 name = "srv-docker-${count.index + 1}" node_name = var.node_name vm_id = 530 + count.index clone { vm_id = 8999 # vmid de ton template debian13-cloudinit full = true } agent { enabled = true } cpu { cores = 2 sockets = 1 type = "host" } memory { dedicated = 4096 } scsi_hardware = "virtio-scsi-single" disk { datastore_id = "VM_POOL_RAID10" interface = "scsi0" size = 20 iothread = true } network_device { bridge = "vmbr1" model = "virtio" vlan_id = 530 } initialization { datastore_id = "VM_POOL_RAID10" # stockage du disque cloud-init (ide2 par défaut) ip_config { ipv4 { address = "192.168.30.2${count.index}/24" gateway = "192.168.30.254" } } user_account { username = "root" keys = [var.vm_user_sshkey] } } operating_system { type = "l26" # Linux 2.6+ kernel (Debian, Ubuntu, etc.) } stop_on_destroy = true }