infrastructure/modules/services/main.tf

34 lines
829 B
Terraform
Raw Normal View History

2024-09-29 23:22:03 +00:00
terraform {
required_providers {
authentik = {
source = "goauthentik/authentik"
version = "~> 2024.8.0"
}
postgresql = {
source = "cyrilgdn/postgresql"
version = "~> 1.23.0"
}
}
}
provider "authentik" {
2024-09-29 23:26:42 +00:00
url = var.authentik_url
token = var.authentik_token
2024-09-29 23:22:03 +00:00
}
provider "postgresql" {
2024-09-29 23:26:42 +00:00
host = var.postgresql_host
port = var.postgresql_port
2024-09-29 23:22:03 +00:00
database = "postgres"
2024-09-29 23:26:42 +00:00
username = var.postgresql_username
password = var.postgresql_password
2024-09-29 23:22:03 +00:00
sslmode = "verify-full"
connect_timeout = 15
}
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}
}