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
Pim Kunis b8afb2ac64 terraform
docker swarm initialization
2023-05-02 11:51:22 +02:00

33 lines
677 B
HCL

terraform {
backend "pg" {
schema_name = "shoarma"
conn_str = "postgres://terraform@10.42.0.1/terraform_state"
}
required_providers {
libvirt = {
source = "dmacvicar/libvirt"
}
}
}
provider "libvirt" {
uri = "qemu+ssh://root@atlas.hyp/system"
}
module "manager" {
source = "git::https://git.pim.kunis.nl/home/tf-modules.git//debian"
name = "maestro"
domain_name = "tf-maestro"
memory = 1024
}
module "workers" {
for_each = {
worker1 = "tf-worker1"
}
source = "git::https://git.pim.kunis.nl/home/tf-modules.git//debian"
name = each.key
domain_name = each.value
memory = 1024 * 3
}