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.
shoarma/terraform/main.tf
2023-07-05 23:55:19 +02:00

82 lines
1.7 KiB
HCL

terraform {
backend "pg" {
schema_name = "shoarma"
conn_str = "postgres://terraform@10.42.0.1/terraform_state"
}
required_providers {
libvirt = {
source = "dmacvicar/libvirt"
}
powerdns = {
source = "pan-net/powerdns"
version = "1.5.0"
}
}
}
provider "libvirt" {
uri = "qemu+ssh://root@atlas.hyp/system"
}
provider "libvirt" {
alias = "jefke"
uri = "qemu+ssh://root@jefke.hyp/system"
}
module "manager" {
source = "git::https://git.kun.is/home/tf-modules.git//debian"
name = "maestro"
domain_name = "tf-maestro"
memory = 1024
mac = "CA:FE:C0:FF:EE:08"
hypervisor_host = "atlas.hyp"
providers = {
libvirt = libvirt
}
}
module "swarmpub1" {
source = "git::https://git.kun.is/home/tf-modules.git//debian"
name = "swarmpub1"
domain_name = "tf-swarmpub1"
memory = 1024 * 5
hypervisor_host = "atlas.hyp"
providers = {
libvirt = libvirt
}
}
module "swarmpriv1" {
source = "git::https://git.kun.is/home/tf-modules.git//debian"
name = "swarmpriv1"
domain_name = "tf-swarmpriv1"
memory = 1024 * 5
hypervisor_host = "atlas.hyp"
providers = {
libvirt = libvirt
}
}
module "swarmpub2" {
source = "git::https://git.kun.is/home/tf-modules.git//debian"
name = "swarmpub2"
domain_name = "tf-swarmpub2"
memory = 1024 * 3
hypervisor_host = "jefke.hyp"
providers = {
libvirt = libvirt.jefke
}
}
module "swarmpriv2" {
source = "git::https://git.kun.is/home/tf-modules.git//debian"
name = "swarmpriv2"
domain_name = "tf-swarmpriv2"
memory = 1024 * 3
hypervisor_host = "jefke.hyp"
providers = {
libvirt = libvirt.jefke
}
}