From ff94f5416d856a218eb3d63cbb1989d8b82434e6 Mon Sep 17 00:00:00 2001 From: bkarstaedt <2082580+bkarstaedt@users.noreply.github.com> Date: Mon, 21 Aug 2023 14:09:21 +0200 Subject: [PATCH] feat: allow .tfvars to be structured in subfolders Especially on level 4 landing zone developers can now structure their tfvars files into sub folders (e.g. networking, compute). The rover CLI interface stays the same. --- scripts/tfstate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tfstate.sh b/scripts/tfstate.sh index f7fc6fbae..a0e5d1ddb 100644 --- a/scripts/tfstate.sh +++ b/scripts/tfstate.sh @@ -26,7 +26,7 @@ function tfstate_configure { if [ ! -z ${TF_var_folder} ]; then rm -rf -- "${landingzone_name}/caf.auto.tfvars" || true - for filename in ${TF_var_folder}/*.tfvars; do + find ${TF_var_folder} -name '*.tfvars' -type f | while read filename; do command="cat ${filename} >> ${landingzone_name}/caf.auto.tfvars && printf '\n' >> ${landingzone_name}/caf.auto.tfvars" debug ${command} eval ${command}