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})
}

View File

@@ -6,6 +6,30 @@ metadata:
name: division
description: null
options:
teams:
default: []
type: array
items:
type: object
properties:
name:
type: string
default: ''
apps:
type: array
default: []
items:
type: string
apps:
default: []
type: array
items:
type: string
domain:
default: your-company
examples:
- your-company
type: string
parent:
default: employes
enum:
@@ -15,30 +39,6 @@ options:
examples:
- employes
type: string
teams:
default: []
items:
properties:
apps:
default: []
items:
type: string
type: array
name:
default: ''
type: string
type: object
type: array
domain:
default: your-company
examples:
- your-company
type: string
apps:
default: []
items:
type: string
type: array
dependencies:
- dist: null
category: share
@@ -50,4 +50,4 @@ providers:
postgresql: null
restapi: null
http: true
tfaddtype: null
tfaddtype: true