Skip to content

Commit

Permalink
fix: Fix the terraform_wrapper_module_for_each hook for modules witho…
Browse files Browse the repository at this point in the history
…ut outputs or variables (#552)

Co-authored-by: Anton Babenko <anton@antonbabenko.com>
  • Loading branch information
ajax-ryzhyi-r and antonbabenko authored Aug 10, 2023
1 parent 789973b commit f24b3fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hooks/terraform_wrapper_module_for_each.sh
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,11 @@ EOF

# Get names of module variables in all terraform files
# shellcheck disable=SC2207
module_vars=($(echo "$all_tf_content" | hcledit block list | grep variable. | cut -d'.' -f 2))
module_vars=($(echo "$all_tf_content" | hcledit block list | { grep variable. || true; } | cut -d'.' -f 2))

# Get names of module outputs in all terraform files
# shellcheck disable=SC2207
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. || true; } | cut -d'.' -f 2))

# Looking for sensitive output
local wrapper_output_sensitive="# sensitive = false # No sensitive module output found"
Expand Down

0 comments on commit f24b3fa

Please sign in to comment.