#domain.tf resource "libvirt_domain" "virtual_machine" { name = var.vm_config["name"] memory = var.vm_config["memory"] vcpu = var.vm_config["cpu"] cpu { mode = "host-passthrough" } cloudinit = libvirt_cloudinit_disk.cloudinit_resized.id network_interface { network_name = var.vm_config["network_name"] wait_for_lease = true } console { type = "pty" target_port = "0" target_type = "serial" } console { type = "pty" target_type = "virtio" target_port = "1" } disk { volume_id = libvirt_volume.os_image.id } graphics { type = "spice" listen_type = "address" autoport = true } }