diff --git a/share/division/groups.tf b/share/division/groups.tf index b0724b0..a635e7f 100644 --- a/share/division/groups.tf +++ b/share/division/groups.tf @@ -25,5 +25,5 @@ resource "authentik_group" "teams" { count = length(local.sorted-teams) name = "team-${var.instance}-${local.sorted-teams[count.index].name}" parent = authentik_group.division.id - attributes = jsonencode({for app in lookup(local.sorted-teams[count.index],"apps", []): app => true}) + attributes = jsonencode({for app in coalesce(lookup(local.sorted-teams[count.index],"apps", []), []): app => true}) } diff --git a/share/division/index.yaml b/share/division/index.yaml index cc7e151..4943e88 100644 --- a/share/division/index.yaml +++ b/share/division/index.yaml @@ -6,6 +6,11 @@ metadata: name: division description: null options: + apps: + default: [] + items: + type: string + type: array parent: default: employes enum: @@ -15,11 +20,11 @@ options: examples: - employes type: string - apps: - default: [] - items: - type: string - type: array + domain: + default: your-company + examples: + - your-company + type: string teams: default: [] items: @@ -34,11 +39,6 @@ options: type: string type: object type: array - domain: - default: your-company - examples: - - your-company - type: string dependencies: - dist: null category: share