This repository has been archived on 2023-12-26. You can view files and clone it, but cannot push or open issues or pull requests.
thecloud/terraform/data/main.tf
2023-06-10 13:10:39 +02:00

30 lines
493 B
HCL

terraform {
backend "pg" {
schema_name = "nfs-data"
conn_str = "postgres://terraform@10.42.0.1/terraform_state"
}
required_providers {
libvirt = {
source = "dmacvicar/libvirt"
}
}
}
provider "libvirt" {
uri = "qemu+ssh://root@lewis.hyp/system"
}
resource "libvirt_volume" "data" {
name = "nfs-data"
pool = "data"
size = 1024 * 1024 * 1024 * 75
lifecycle {
prevent_destroy = true
}
}
output "data_disk_id" {
value = libvirt_volume.data.id
}