fix
This commit is contained in:
@@ -10,15 +10,18 @@ locals {
|
|||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data "authentik_group" "parent" {
|
||||||
|
name = var.parent
|
||||||
|
}
|
||||||
resource "authentik_group" "division" {
|
resource "authentik_group" "division" {
|
||||||
name = "div-${var.instance}"
|
name = "div-${var.instance}"
|
||||||
parent = var.parent
|
parent = data.authentik_group.parent.id
|
||||||
attributes = jsonencode({for app in var.apps: app => true})
|
attributes = jsonencode({for app in var.apps: app => true})
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "authentik_group" "teams" {
|
resource "authentik_group" "teams" {
|
||||||
count = length(local.sorted-teams)
|
count = length(local.sorted-teams)
|
||||||
name = "team-${var.instance}-${local.sorted-teams[count.index].name}"
|
name = "team-${var.instance}-${local.sorted-teams[count.index].name}"
|
||||||
parent = "div-${var.instance}"
|
parent = authentik_group.division.id
|
||||||
attributes = jsonencode({for app in local.sorted-teams[count.index].apps: app => true})
|
attributes = jsonencode({for app in local.sorted-teams[count.index].apps: app => true})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,23 +8,18 @@ metadata:
|
|||||||
options:
|
options:
|
||||||
teams:
|
teams:
|
||||||
default: []
|
default: []
|
||||||
type: array
|
|
||||||
items:
|
items:
|
||||||
type: object
|
|
||||||
properties:
|
properties:
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
default: ''
|
|
||||||
apps:
|
apps:
|
||||||
type: array
|
|
||||||
default: []
|
default: []
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
apps:
|
type: array
|
||||||
default: []
|
name:
|
||||||
|
default: ''
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
type: array
|
type: array
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
domain:
|
domain:
|
||||||
default: your-company
|
default: your-company
|
||||||
examples:
|
examples:
|
||||||
@@ -39,6 +34,11 @@ options:
|
|||||||
examples:
|
examples:
|
||||||
- employes
|
- employes
|
||||||
type: string
|
type: string
|
||||||
|
apps:
|
||||||
|
default: []
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
type: array
|
||||||
dependencies:
|
dependencies:
|
||||||
- dist: null
|
- dist: null
|
||||||
category: share
|
category: share
|
||||||
|
|||||||
Reference in New Issue
Block a user