30 lines
429 B
Terraform
30 lines
429 B
Terraform
|
terraform {
|
||
|
backend "pg" {
|
||
|
schema_name = "nfs-data"
|
||
|
}
|
||
|
|
||
|
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
|
||
|
}
|