This commit is contained in:
2023-10-03 11:54:14 +02:00
parent 1aae294a81
commit 21802c4601
4 changed files with 111 additions and 111 deletions

View File

@@ -13,12 +13,12 @@ locals {
resource "authentik_group" "division" {
name = "div-${var.instance}"
parent = var.parent
attributes = jsonencode(merge([for app in var.apps: {"${app}" = true}]))
attributes = jsonencode({for app in var.apps: app => true})
}
resource "authentik_group" "teams" {
count = length(local.sorted-teams)
name = "team-${var.instance}-${local.sorted-teams[count.index].name}"
parent = "div-${var.instance}"
attributes = jsonencode(merge([for app in local.sorted-teams[count.index].apps: {"${app}" = true}]))
attributes = jsonencode({for app in local.sorted-teams[count.index].apps: app => true})
}