This commit is contained in:
2024-04-11 10:59:56 +02:00
parent 0ad9715154
commit c25e5e7718
18 changed files with 1116 additions and 1095 deletions

View File

@@ -46,21 +46,21 @@ locals {
"class" = var.storage.volume.class
}
authentik = merge(local.global,{ for k, v in var.authentik : k => v if !contains(["enable","storage","backups"],k) },{
backups = merge(lookup(var.authentik, "backups", {}), local.global-backups)
backups = merge(local.global-backups, lookup(var.authentik, "backups", {}))
storage = merge({ for k, v in lookup(var.authentik, "storage", {}) : k => v if !contains(["volume"],k) }, {
volume = merge(lookup(lookup(var.authentik, "storage", {}), "volume", {}), local.global-volume)
volume = merge(local.global-volume, lookup(lookup(var.authentik, "storage", {}), "volume", {}))
})
})
authentik-ldap = merge(local.global,{ for k, v in var.authentik-ldap : k => v if !contains(["enable","storage","backups"],k) },{
backups = merge(lookup(var.authentik-ldap, "backups", {}), local.global-backups)
backups = merge(local.global-backups, lookup(var.authentik-ldap, "backups", {}))
storage = merge({ for k, v in lookup(var.authentik-ldap, "storage", {}) : k => v if !contains(["volume"],k) }, {
volume = merge(lookup(lookup(var.authentik-ldap, "storage", {}), "volume", {}), local.global-volume)
volume = merge(local.global-volume, lookup(lookup(var.authentik-ldap, "storage", {}), "volume", {}))
})
})
authentik-forward = merge(local.global,{ for k, v in var.authentik-forward : k => v if !contains(["enable","storage","backups"],k) },{
backups = merge(lookup(var.authentik-forward, "backups", {}), local.global-backups)
backups = merge(local.global-backups, lookup(var.authentik-forward, "backups", {}))
storage = merge({ for k, v in lookup(var.authentik-forward, "storage", {}) : k => v if !contains(["volume"],k) }, {
volume = merge(lookup(lookup(var.authentik-forward, "storage", {}), "volume", {}), local.global-volume)
volume = merge(local.global-volume, lookup(lookup(var.authentik-forward, "storage", {}), "volume", {}))
})
})
}