Skip to content

Commit 048b02e

Browse files
authored
Suppress warnings on terraform outputs (#69)
1 parent 9c9c79a commit 048b02e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,10 @@ runs:
417417
set -e
418418
419419
cat "${TERRAFORM_OUTPUT_FILE}"
420-
atmos terraform output ${{ inputs.component }} --stack ${{ inputs.stack }} --skip-init -- -json | grep -v 'Switched to workspace' 1> output_values.json
420+
atmos terraform output ${{ inputs.component }} --stack ${{ inputs.stack }} --skip-init -- -json -compact-warnings -no-color | \
421+
grep -v 'Switched to workspace' | \
422+
awk '$1~/^Warnings:$/ {exit} {print}' | \
423+
grep -v 'WARN detected' 1> output_values.json
421424
terraform-docs -c ${GITHUB_ACTION_PATH}/config/tfdocs-config.yaml --output-file ${{ github.workspace }}/atmos-apply-summary.md ./
422425
423426
sed -i "s#\`<sensitive>\`#![Sensitive](https://img.shields.io/badge/sensitive-c40000?style=for-the-badge)#g" ${{ github.workspace }}/atmos-apply-summary.md

0 commit comments

Comments
 (0)