diff --git a/meta/domain/index.yaml b/meta/domain/index.yaml index 47119be..4d31963 100644 --- a/meta/domain/index.yaml +++ b/meta/domain/index.yaml @@ -6,24 +6,22 @@ metadata: name: domain description: null options: - erp: + issuer: + default: letsencrypt-prod + examples: + - letsencrypt-prod + type: string + ingress-class: + default: traefik + examples: + - traefik + type: string + devspaces: default: - dolibarr: - enable: true enable: false examples: - - dolibarr: - enable: true - enable: false + - enable: false properties: - dolibarr: - default: - enable: true - properties: - enable: - default: true - type: boolean - type: object enable: default: false type: boolean @@ -50,26 +48,6 @@ options: type: boolean type: object type: object - issuer: - default: letsencrypt-prod - examples: - - letsencrypt-prod - type: string - domain-name: - default: your_company.com - examples: - - your_company.com - type: string - mail: - default: - enable: false - examples: - - enable: false - properties: - enable: - default: false - type: boolean - type: object distributions: default: core: core @@ -85,28 +63,6 @@ options: default: domain type: string type: object - infra: - default: - enable: false - traefik: - enable: false - examples: - - enable: false - traefik: - enable: false - properties: - enable: - default: false - type: boolean - traefik: - default: - enable: false - properties: - enable: - default: false - type: boolean - type: object - type: object ci: default: enable: false @@ -129,7 +85,29 @@ options: type: boolean type: object type: object - devspaces: + erp: + default: + dolibarr: + enable: true + enable: false + examples: + - dolibarr: + enable: true + enable: false + properties: + dolibarr: + default: + enable: true + properties: + enable: + default: true + type: boolean + type: object + enable: + default: false + type: boolean + type: object + mail: default: enable: false examples: @@ -149,36 +127,33 @@ options: default: true type: boolean type: object - ingress-class: - default: traefik - examples: - - traefik - type: string - storage-classes: + infra: default: - BlockReadWriteMany: '' - BlockReadWriteOnce: '' - FilesystemReadWriteMany: '' - FilesystemReadWriteOnce: '' + enable: false + traefik: + enable: false examples: - - BlockReadWriteMany: '' - BlockReadWriteOnce: '' - FilesystemReadWriteMany: '' - FilesystemReadWriteOnce: '' + - enable: false + traefik: + enable: false properties: - BlockReadWriteMany: - default: '' - type: string - BlockReadWriteOnce: - default: '' - type: string - FilesystemReadWriteMany: - default: '' - type: string - FilesystemReadWriteOnce: - default: '' - type: string + enable: + default: false + type: boolean + traefik: + default: + enable: false + properties: + enable: + default: false + type: boolean + type: object type: object + domain-name: + default: your_company.com + examples: + - your_company.com + type: string backups: default: enable: false @@ -209,6 +184,31 @@ options: default: backup-settings type: string type: object + storage-classes: + default: + BlockReadWriteMany: '' + BlockReadWriteOnce: '' + FilesystemReadWriteMany: '' + FilesystemReadWriteOnce: '' + examples: + - BlockReadWriteMany: '' + BlockReadWriteOnce: '' + FilesystemReadWriteMany: '' + FilesystemReadWriteOnce: '' + properties: + BlockReadWriteMany: + default: '' + type: string + BlockReadWriteOnce: + default: '' + type: string + FilesystemReadWriteMany: + default: '' + type: string + FilesystemReadWriteOnce: + default: '' + type: string + type: object dependencies: [] providers: kubernetes: null diff --git a/meta/domain/installs.tf b/meta/domain/installs.tf index 3176735..9f072ec 100644 --- a/meta/domain/installs.tf +++ b/meta/domain/installs.tf @@ -67,7 +67,7 @@ resource "kubectl_manifest" "auth" { distrib: "${var.distributions.domain}" category: "meta" component: "domain-auth" - options: ${jsonencode(merge(local.global, local.added-auth, local.auth, local.divisions))} + options: ${jsonencode(merge(local.global, local.added-auth, local.divisions, local.auth))} EOF } resource "kubectl_manifest" "infra" { diff --git a/share/division/groups.tf b/share/division/groups.tf index cf93d40..0aa0865 100644 --- a/share/division/groups.tf +++ b/share/division/groups.tf @@ -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}) } diff --git a/share/division/index.yaml b/share/division/index.yaml index 4533c4d..93a1dbe 100644 --- a/share/division/index.yaml +++ b/share/division/index.yaml @@ -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