Skip to content

Commit 880469c

Browse files
committed
fix: limit TF_VAR check to *.tf files
1 parent 5374811 commit 880469c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/scripts/terraform-variable-check.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ WORKFLOW_VARS="$(grep -r "^\s*TF_VAR" $SCRIPT_DIR/../ | awk -F ':' '{print $2}'
1515
# Loop through all the variables in the workflow and check if they are defined in the *.tf code
1616
for VAR in $WORKFLOW_VARS; do
1717
echo "🔎 Checking variable: \"$VAR\""
18-
grep -r "variable \"$VAR\"" "$SCRIPT_DIR/../../../" || (echo "❌ Variable \"$VAR\" is not defined as a Terraform variable" && exit 1)
18+
grep -r --include="*.tf" "variable \"$VAR\"" "$SCRIPT_DIR/../../../" || (echo "❌ Variable \"$VAR\" is not defined as a Terraform variable" && exit 1)
1919
done

0 commit comments

Comments
 (0)