mirror of
https://github.com/tofuutils/pre-commit-opentofu.git
synced 2025-10-15 17:38:54 +02:00
fix: Fixed spacing in terraform_wrapper_module_for_each hook (#503)
This commit is contained in:
parent
b7417bb4c6
commit
ddc0d81d31
2 changed files with 3 additions and 3 deletions
|
|
@ -38,7 +38,7 @@ repos:
|
||||||
|
|
||||||
# Dockerfile linter
|
# Dockerfile linter
|
||||||
- repo: https://github.com/hadolint/hadolint
|
- repo: https://github.com/hadolint/hadolint
|
||||||
rev: v2.12.0
|
rev: v2.12.1-beta
|
||||||
hooks:
|
hooks:
|
||||||
- id: hadolint
|
- id: hadolint
|
||||||
args: [
|
args: [
|
||||||
|
|
|
||||||
|
|
@ -330,13 +330,13 @@ EOF
|
||||||
module_outputs=($(echo "$all_tf_content" | hcledit block list | grep output. | cut -d'.' -f 2))
|
module_outputs=($(echo "$all_tf_content" | hcledit block list | grep output. | cut -d'.' -f 2))
|
||||||
|
|
||||||
# Looking for sensitive output
|
# Looking for sensitive output
|
||||||
local wrapper_output_sensitive="# sensitive = false # No sensitive module output found"
|
local wrapper_output_sensitive="# sensitive = false # No sensitive module output found"
|
||||||
for module_output in "${module_outputs[@]}"; do
|
for module_output in "${module_outputs[@]}"; do
|
||||||
module_output_sensitive=$(echo "$all_tf_content" | hcledit attribute get "output.${module_output}.sensitive")
|
module_output_sensitive=$(echo "$all_tf_content" | hcledit attribute get "output.${module_output}.sensitive")
|
||||||
|
|
||||||
# At least one output is sensitive - the wrapper's output should be sensitive, too
|
# At least one output is sensitive - the wrapper's output should be sensitive, too
|
||||||
if [[ "$module_output_sensitive" == "true" ]]; then
|
if [[ "$module_output_sensitive" == "true" ]]; then
|
||||||
wrapper_output_sensitive="sensitive = true # At least one sensitive module output (${module_output}) found (requires Terraform 0.14+)"
|
wrapper_output_sensitive="sensitive = true # At least one sensitive module output (${module_output}) found (requires Terraform 0.14+)"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue