fix: forEach implementation in zitadel module

This commit is contained in:
Chris Kruining 2025-12-01 14:49:33 +01:00 committed by chris
parent afbf168c35
commit b64cfa9e73
2 changed files with 19 additions and 13 deletions

View file

@ -335,14 +335,6 @@ in
;
append = attrList: set: set // (listToAttrs attrList);
forEach = src: key: set:
let
_key = concatMapStringsSep "_" (k: "\${item.${k}}") key;
in
{
forEach = "{ for item in ${src} : \"${_key}\" => item }";
}
// set;
config' = config;
@ -352,7 +344,21 @@ in
modules = [
({ config, lib, ... }: {
config = {
config =
let
forEach = src: key: set:
let
_key = concatMapStringsSep "_" (k: "\${item.${k}}") key;
in
{
forEach = lib.tfRef ''{
for item in ${src} :
"''${item.org}_''${item.name}" => item
}'';
}
// set;
in
{
terraform.required_providers.zitadel = {
source = "zitadel/zitadel";
version = "2.2.0";