Move all_services into opentofu

This commit is contained in:
Tobias Reisinger 2024-10-06 19:08:13 +02:00
parent 6fdfd338a1
commit 2ad3cce749
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
10 changed files with 415 additions and 267 deletions
modules

View file

@ -75,7 +75,18 @@ variable "default_ssh_key" {
variable "services" {
type = map(object({
name = string
subdomain = string
host = string
dns = optional(list(object({
domain = string
target = string
name = optional(string)
alias = optional(string)
})))
backup = optional(list(object({
name = string
type = string
})))
ports = optional(list(string))
auth = bool
auth_redirects = optional(list(string))
s3 = bool

View file

@ -28,6 +28,6 @@ resource "authentik_provider_oauth2" "service_providers" {
resource "authentik_application" "service_applications" {
for_each = local.services_auth
name = each.value.name
slug = "${each.value.subdomain}-serguzim-me"
slug = "${each.value.dns[0].target}-serguzim-me"
protocol_provider = authentik_provider_oauth2.service_providers[each.key].id
}

View file

@ -24,7 +24,18 @@ variable "postgresql_password" {
variable "services" {
type = map(object({
name = string
subdomain = string
host = string
dns = optional(list(object({
domain = string
target = string
name = optional(string)
alias = optional(string)
})))
backup = optional(list(object({
name = string
type = string
})))
ports = optional(list(string))
auth = bool
auth_redirects = optional(list(string))
s3 = bool