data "proxmox_files" "ubuntu_image" { content_type = "import" node_name = var.target_node datastore_id = "local" file_name_regex = "jammy" } resource "proxmox_virtual_environment_vm" "vm_ubuntu_iscsi" { count = 3 vm_id = 100 + count.index + 2 name = "ubuntu-cloud-vm-${count.index + 1}" node_name = var.target_node initialization { ip_config { ipv4 { address = "dhcp" } } user_account { username = "root" password = "rootroot" keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILLRRYg0z5DoKq+67DeZFUo+dOqz2GedGKHHjGHiMMNo dodin@ArthurDodin", "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID5KraX1jeWQb7Rq24fbEKDHdPcw5OV4FK5AdApv3lXU n005char@gmail.com"] } } cpu { cores = 2 } memory { dedicated = 2048 } network_device { bridge = "vmbr1" } disk { interface = "scsi0" datastore_id = "truenas_lvm" import_from = data.proxmox_files.ubuntu_image.files[0].id } }