# https://github.com/dmacvicar/terraform-provider-libvirt/blob/master/website/docs/r/volume.html.markdown # -------- root disk use by compute -------- # ~> Tip: when provisioning multiple domains using the same base image, create a libvirt_volume for the base image and then define # the domain specific ones as based on it. This way the image will not be modified and no extra disk space is going to be used for the base image. resource "libvirt_volume" "root_centos" { name = "my-root-centos" pool = var.pool_1 base_volume_name = local.centos7_qcow2 } resource "libvirt_volume" "root_debian" { name = format("root-debian-%s", count.index) pool = var.pool_1 base_volume_name = local.debian_buster_qcow2 count = local.number_domain } resource "libvirt_volume" "external_disk" { name = format("external-disk-%s", count.index) # 10Gb size = 10737418240 pool = var.pool_1 count = local.number_domain }