Last active
December 3, 2015 16:06
-
-
Save billmoritz/c54902d20a72d9396e20 to your computer and use it in GitHub Desktop.
Download cloudformation templates from your aws account
This file contains 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
#!/bin/bash | |
for i in `aws cloudformation list-stacks --output text --stack-status-filter CREATE_COMPLETE | awk '{ print $4 }'`; do | |
aws cloudformation get-template --stack-name $i | jq .TemplateBody | jq -S '.AWSTemplateFormatVersion="2010-09-09"' > stacks/$i.json | |
done | |
for i in `aws cloudformation list-stacks --output text --stack-status-filter UPDATE_COMPLETE | awk '{ print $5 }'`; do | |
aws cloudformation get-template --stack-name $i | jq .TemplateBody | jq -S '.AWSTemplateFormatVersion="2010-09-09"' > stacks/$i.json | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment