feat: spport .tofu files (#6)

Signed-off-by: T. Hinrichsmeyer <t.hinrichsmeyer@ndr.de>
This commit is contained in:
T. Hinrichsmeyer 2024-10-02 15:05:21 +02:00
commit e059c5859b
No known key found for this signature in database
GPG key ID: 984B6DEB69D24B71
4 changed files with 53 additions and 35 deletions

View file

@ -312,10 +312,10 @@ EOF
# Read content of all OpenTofu files
# shellcheck disable=SC2207
all_tf_content=$(find "${full_module_dir}" -name '*.tf' -maxdepth 1 -type f -exec cat {} +)
all_tf_content=$(find "${full_module_dir}" -regex '.*\.(tf|tofu)' -maxdepth 1 -type f -exec cat {} +)
if [[ ! $all_tf_content ]]; then
common::colorify "yellow" "Skipping ${full_module_dir} because there are no *.tf files."
common::colorify "yellow" "Skipping ${full_module_dir} because there are no *.(tf|tofu) files."
continue
fi