Adjust the regex used to detect ${ENV_VAR} patterns in
hooks/_common.sh to avoid Bash-incompatible constructs and to be
compatible with macOS/BSD regex behavior.
- Remove unnecessary leading/trailing '.*' since =~ matches substrings.
- Allow lowercase letters in subsequent identifier characters
([A-Za-z0-9_]) so variable names with lowercase chars are detected.
- Keep first-char restriction to uppercase or underscore to match
existing extraction logic.
Signed-off-by: Michael Rosenfeld <mrosenfe@sheetz.com>
Deduplicate directories in tofu_docs_replace.py by using a set of real
paths, ensuring each directory is processed only once. Refactor
tofu_validate.sh to use command substitution with proper exit code
handling, improving reliability and clarity.
Signed-off-by: Michael Rosenfeld <michael@rosesecurity.com>
Initialize the config_file_no_color variable to prevent potential
unbound variable errors during script execution. This change improves
script robustness and reliability.
Signed-off-by: Michael Rosenfeld <michael@rosesecurity.com>
Add support for the `.tofu` file extension in OpenTofu config
matching and documentation. Update pre-commit hooks, regex, and
README to reflect support for `.tofu` files alongside `.tf` and
`.tfvars`. Fix minor shell quoting and array assignment issues.
Upgrade pre-commit-hooks to v6.0.0.
Signed-off-by: Michael Rosenfeld <michael@rosesecurity.com>
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>
Replace deprecated `terragrunt hclfmt` command with the recommended
`terragrunt hcl format` to eliminate deprecation warnings.
Resolves warning: "The `hclfmt` command is deprecated and will be
removed in a future version of Terragrunt."
Signed-off-by: widnyana <wid@widnyana.web.id>
---------
Co-authored-by: Jon M <arxro008@euro.ngc.com>
Co-authored-by: George L. Yermulnik <yz@yz.kiev.ua>
Co-authored-by: Maksym Vlasov <MaxymVlasov@users.noreply.github.com>
Co-authored-by: George L. Yermulnik <yz@yz.kiev.ua>
Co-authored-by: MaxymVlasov <MaxymVlasov@users.noreply.github.com>
Co-authored-by: Anton Babenko <anton@antonbabenko.com>