Skip to content

Commit a8490ca

Browse files
[NDR-71] Debug
1 parent 440d322 commit a8490ca

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/terraform-dev-to-main-ci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ jobs:
7272
run: |
7373
terraform plan -input=false -no-color -var-file="${{vars.TF_VARS_FILE}}" -out tf.plan
7474
terraform show -no-color tf.plan > tfplan.txt
75+
76+
77+
echo "0"
7578
7679
# Mask sensitive URLs in the Terraform Plan output
7780
grep -Eo 'https://[a-zA-Z0-9.-]+\.execute-api\.[a-zA-Z0-9.-]+\.amazonaws\.com/[a-zA-Z0-9/._-]*' tfplan.txt | while read -r api_url; do
@@ -80,28 +83,38 @@ jobs:
8083
fi
8184
done
8285
86+
echo "1"
87+
8388
# Mask Lambda invocation URLs
8489
grep -Eo 'https://[a-zA-Z0-9.-]+\.lambda\.amazonaws\.com/[a-zA-Z0-9/._-]+' tfplan.txt | while read -r lambda_url; do
8590
if [ -n "$lambda_url" ]; then
8691
echo "::add-mask::$lambda_url"
8792
fi
8893
done
8994
95+
echo "2"
96+
9097
# Mask AWS account IDs (12-digit numbers)
9198
grep -Eo '[0-9]{12}' tfplan.txt | while read -r account_id; do
9299
if [ -n "$account_id" ]; then
93100
echo "::add-mask::$account_id"
94101
fi
95102
done
96103
104+
echo "3"
105+
97106
# Mask GitHub secrets
98107
echo "::add-mask::${{ secrets.AWS_ASSUME_ROLE }}"
99108
echo "::add-mask::${{ secrets.GITHUB_TOKEN }}"
100109
110+
echo "4"
111+
101112
102113
# Mask Terraform variables
103114
echo "::add-mask::${{ vars.TF_VARS_FILE }}"
104115
116+
echo "5"
117+
105118
echo "summary=$(grep -E 'Plan: [0-9]+ to add, [0-9]+ to change, [0-9]+ to destroy\.|No changes\. Your infrastructure matches the configuration\.' tfplan.txt | sed 's/.*No changes\. Your infrastructure matches the configuration/Plan: no changes/g' | sed 's/.*Plan: //g' | sed 's/\..*//g')" >> $GITHUB_OUTPUT
106119
working-directory: ./infrastructure
107120
shell: bash

0 commit comments

Comments
 (0)