# 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. It does NOT create libvirt_volume resources
# (per-VM disk images) -- that is deferred alongside the domain/node-VM module;
# see opentofu/README.md for why.

resource "libvirt_pool" "dc" {
  name = "${var.dc_name}-pool"
  type = "dir"

  target {
    path = var.target_path
  }
}
