Refactor all_services to remove name attribute
This commit is contained in:
parent
6f9f888478
commit
1d14ac888e
16 changed files with 42 additions and 71 deletions
modules/services
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue