# dc-storage-pool: one directory-backed libvirt storage pool per DC, for the
# node-VM disk images OpenTofu will create (buildout-design Phase 0: "libvirt
# storage pools + thin-provisioning"). Deliberately the simplest pool type
# ("dir") -- thin-provisioning here is a property of the underlying host
# filesystem/volume, not a libvirt_pool argument; there is no thin-provisioning
# switch on this resource to set.
#
# This module stops at the pool. Per-VM disk (libvirt_volume) creation lives
# in modules/node-vm now that the domain module has been authored.
#
# SYNTAX NOTE (corrected 2026-07-09): attribute-style (`target = { ... }`),
# not block syntax -- see modules/dc-planes/main.tf's note for the
# verification source (real example .tf files in the provider's own repo).
resource "libvirt_pool" "dc" {
name = "${var.dc_name}-pool"
type = "dir"
target = {
path = var.target_path
}
}