infrastructure/modules/infrastructure/main.tf
2024-10-31 03:17:55 +01:00

37 lines
878 B
HCL

terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0"
}
hcloud = {
source = "hetznercloud/hcloud"
version = "~> 1.45.0"
}
healthchecksio = {
source = "kristofferahl/healthchecksio"
version = "~> 1.6.0"
}
ovh = {
source = "ovh/ovh"
version = "~> 0.48.0"
}
scaleway = {
source = "scaleway/scaleway"
version = "~> 2.43.0"
}
tailscale = {
source = "tailscale/tailscale"
version = "~> 0.16.0"
}
}
}
locals {
services_auth = {for key, val in var.services : key => val if val.auth}
services_database = {for key, val in var.services : key => val if val.database}
services_s3 = {for key, val in var.services : key => val if val.s3}
hetzner_hosts = {for key, val in var.hosts : key => val if val.provider == "hetzner"}
}