fix: expand file extension patterns for tofu hooks

Update file matching patterns in .pre-commit-hooks.yaml to support .tofu,
.tfvars, and other relevant extensions for OpenTofu workflows. Also clarify
log message in tofu_wrapper_module_for_each.sh for missing files.

Signed-off-by: Michael Rosenfeld <michael@rosesecurity.com>
This commit is contained in:
Michael Rosenfeld 2026-05-24 21:48:09 -04:00
commit 451aaa59b5
No known key found for this signature in database
GPG key ID: C17037A434741480
2 changed files with 10 additions and 10 deletions

View file

@ -315,7 +315,7 @@ EOF
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|tofu) files."
common::colorify "yellow" "Skipping ${full_module_dir} because there are no .tf or .tofu files."
continue
fi