Pim Kunis
788939d8cf
remove secret service usage with password in home dir replace hermes mounted dir with data disk pin terraform libvirt provider due to SSH issue hard-code ssh known host file
31 lines
616 B
HCL
31 lines
616 B
HCL
terraform {
|
|
backend "pg" {
|
|
schema_name = "hermes-data"
|
|
}
|
|
|
|
required_providers {
|
|
libvirt = {
|
|
source = "dmacvicar/libvirt"
|
|
version = "0.7.1" # https://github.com/dmacvicar/terraform-provider-libvirt/issues/1040
|
|
}
|
|
}
|
|
}
|
|
|
|
provider "libvirt" {
|
|
# https://libvirt.org/uri.html#libssh-and-libssh2-transport
|
|
uri = "qemu+ssh://root@atlas.hyp/system?known_hosts=/etc/ssh/ssh_known_hosts"
|
|
}
|
|
|
|
resource "libvirt_volume" "data" {
|
|
name = "hermes-data"
|
|
pool = "data"
|
|
size = 1024 * 1024
|
|
|
|
lifecycle {
|
|
prevent_destroy = true
|
|
}
|
|
}
|
|
|
|
output "data_disk_id" {
|
|
value = libvirt_volume.data.id
|
|
}
|