shared modules to be used across deployments

This commit is contained in:
Lukas Greve
2025-09-04 11:30:46 +02:00
parent 96e8bd7588
commit ac81cb65ce
8 changed files with 207 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
resource "libvirt_domain" "domain" {
count = var.instance_count
name = "${var.vm_name}-${count.index}"
memory = var.memory
vcpu = var.vcpu
cloudinit = libvirt_cloudinit_disk.commoninit.id
cpu {
mode = "host-model"
}
disk {
volume_id = element(libvirt_volume.vm_disk.*.id, count.index)
}
console {
type = "pty"
target_port = "0"
target_type = "virtio"
}
video {
type = "virtio"
}
tpm {
backend_type = "emulator"
backend_version = "2.0"
}
network_interface {
network_name = var.network_name
}
}