common + docker working

This commit is contained in:
Pim Kunis 2023-04-12 15:43:59 +02:00
parent 72f2cc91f6
commit 46dd504b43
9 changed files with 126 additions and 43 deletions

30
data/main.tf Normal file
View file

@ -0,0 +1,30 @@
terraform {
backend "pg" {
schema_name = "max-data"
conn_str = "postgres://terraform@10.42.0.1/terraform_state"
}
required_providers {
libvirt = {
source = "dmacvicar/libvirt"
}
}
}
provider "libvirt" {
uri = "qemu+ssh://root@atlas.lan/system"
}
resource "libvirt_volume" "data" {
name = "max-data"
pool = "data"
size = 1024 * 1024 * 1024 * 65
lifecycle {
prevent_destroy = true
}
}
output "data_disk_id" {
value = libvirt_volume.data.id
}