Refactor all_services to remove name attribute

This commit is contained in:
Tobias Reisinger 2024-10-22 18:29:03 +02:00
parent 6f9f888478
commit 1d14ac888e
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
16 changed files with 42 additions and 71 deletions
modules/services

View file

@ -53,9 +53,9 @@ resource "authentik_group" "minio_users" {
resource "authentik_provider_oauth2" "service_providers" {
for_each = local.services_auth
name = each.value.name
name = each.key
client_type = "confidential"
client_id = each.value.name
client_id = each.key
authorization_flow = data.authentik_flow.default_authorization_flow.id
redirect_uris = each.value.auth_redirects
property_mappings = flatten([
@ -69,7 +69,7 @@ resource "authentik_provider_oauth2" "service_providers" {
resource "authentik_application" "service_applications" {
for_each = local.services_auth
name = each.value.name
name = each.key
slug = replace(each.value.dns[0].domain, ".", "-")
protocol_provider = authentik_provider_oauth2.service_providers[each.key].id
}