Refactor "dns" to remove target-domain split

This commit is contained in:
Tobias Reisinger 2024-10-19 00:19:23 +02:00
parent 82c25edf8e
commit 810bf9acb5
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
8 changed files with 33 additions and 72 deletions
modules

View file

@ -16,7 +16,6 @@ variable "services" {
host = string
dns = optional(list(object({
domain = string
target = string
name = optional(string)
alias = optional(string)
})))

View file

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

View file

@ -7,7 +7,6 @@ variable "services" {
host = string
dns = optional(list(object({
domain = string
target = string
name = optional(string)
alias = optional(string)
})))