Created
February 21, 2020 05:37
-
-
Save toshke/ee2458e1d14871289b636a300e8aae7f to your computer and use it in GitHub Desktop.
Validate all cloudformation templates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
for f in *.yaml; do | |
printf "Check ${f}..." | |
aws cloudformation validate-template --template-body "file://${f}" > /dev/null 2>&1 | |
if [ "$?" != "0" ]; then | |
echo "\n${f} failed, run following for details" | |
echo " aws cloudformation validate-template --template-body file://${f}\n\n" | |
exit 1 | |
fi | |
printf " [OK]\n" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment