builder.braak.pro/provision/local/main.tf
Bart van der Braak 043a1b6ffa
Some checks failed
/ checks (pull_request) Failing after 12s
Add Prometheus metrics to Buildbot
2024-11-26 17:16:21 +01:00

49 lines
No EOL
942 B
HCL

terraform {
required_providers {
libvirt = {
source = "dmacvicar/libvirt"
}
}
}
provider "libvirt" {
uri = "qemu:///system"
}
resource "libvirt_volume" "win11-ltsc-cloudbase-init" {
name = "win11-ltsc-cloudbase-init.qcow2"
pool = "default" # List storage pools using virsh pool-list
source = "win11-ltsc-original.qcow2"
format = "qcow2"
}
resource "libvirt_domain" "win11-ltsc-cloudbase-init" {
name = "win11-ltsc-cloudbase-init"
memory = "8192"
vcpu = 4
network_interface {
network_name = "default" # List networks with virsh net-list
}
disk {
volume_id = "${libvirt_volume.win11-ltsc-cloudbase-init.id}"
}
console {
type = "pty"
target_type = "serial"
target_port = "0"
}
graphics {
type = "spice"
listen_type = "address"
autoport = true
}
}
# Output Server IP
output "ip" {
value = "${libvirt_domain.centos7.network_interface.0.addresses.0}"
}