From 1aae294a81ad749545081e4a1d0ad83bdcea508f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Huss?= Date: Tue, 3 Oct 2023 11:26:09 +0200 Subject: [PATCH] fix --- share/accounts-management/groups.tf | 6 ++-- share/accounts-management/index.yaml | 44 ++++++++++++++-------------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/share/accounts-management/groups.tf b/share/accounts-management/groups.tf index ef1a965..3bc7fc7 100644 --- a/share/accounts-management/groups.tf +++ b/share/accounts-management/groups.tf @@ -1,16 +1,16 @@ resource "authentik_group" "employes" { name = "employes" - attributes = jsonencode(merge({},[for app in var.employes.apps: {"${app}" = true}])) + attributes = jsonencode({for app in var.employes.apps: app => true}) } resource "authentik_group" "fournisseurs" { count = var.fournisseurs.enable ? 1 : 0 name = "fournisseurs" - attributes = jsonencode(merge({},[for app in var.fournisseurs.apps: {"${app}" = true}])) + attributes = jsonencode({for app in var.fournisseurs.apps: app => true}) } resource "authentik_group" "clients" { count = var.clients.enable ? 1 : 0 name = "clients" - attributes = jsonencode(merge({},[for app in var.clients.apps: {"${app}" = true}])) + attributes = jsonencode({for app in var.clients.apps: app => true}) } diff --git a/share/accounts-management/index.yaml b/share/accounts-management/index.yaml index fcad62c..3380f01 100644 --- a/share/accounts-management/index.yaml +++ b/share/accounts-management/index.yaml @@ -6,6 +6,11 @@ metadata: name: accounts-management description: null options: + domain: + default: your-company + examples: + - your-company + type: string clients: default: enable: false @@ -23,6 +28,23 @@ options: - enable: false apps: [] type: object + fournisseurs: + default: + enable: false + apps: [] + properties: + enable: + type: boolean + default: false + apps: + type: array + items: + type: string + default: [] + examples: + - enable: false + apps: [] + type: object employes: default: apps: [] @@ -35,28 +57,6 @@ options: examples: - apps: [] type: object - fournisseurs: - default: - enable: false - apps: [] - properties: - enable: - type: boolean - default: false - apps: - type: array - items: - type: string - default: [] - examples: - - enable: false - apps: [] - type: object - domain: - default: your-company - examples: - - your-company - type: string dependencies: - dist: null category: share