modularize tf infrastructure
This commit is contained in:
parent
493daeeb29
commit
6dae248c01
14 changed files with 291 additions and 151 deletions
28
tofu/storage/main.tf
Normal file
28
tofu/storage/main.tf
Normal file
|
@ -0,0 +1,28 @@
|
|||
terraform {
|
||||
required_providers {
|
||||
libvirt = {
|
||||
source = "dmacvicar/libvirt"
|
||||
version = "0.7.6"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "libvirt_pool" "hklbgd" {
|
||||
name = "hklbgd-guests"
|
||||
type = "dir"
|
||||
path = "/var/lib/libvirt/guest_images"
|
||||
}
|
||||
|
||||
resource "libvirt_volume" "fcos" {
|
||||
name = "fedora-coreos-39.20240210.3.0-qemu.x86_64.qcow2"
|
||||
pool = libvirt_pool.hklbgd.name
|
||||
format = "qcow2"
|
||||
}
|
||||
|
||||
output "pool" {
|
||||
value = libvirt_pool.hklbgd.name
|
||||
}
|
||||
|
||||
output "base_volume_id" {
|
||||
value = libvirt_volume.fcos.id
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue