Created
February 18, 2021 00:57
-
-
Save tunaranch/6f1cc0c8d858b78beb46a0fa698e5f7c to your computer and use it in GitHub Desktop.
CloudFormation accelerator
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
strip-extension(){ | |
echo $1| rev | cut -d. -f2 | rev | |
} | |
create-stack(){ | |
TEMPLATE_FILE=$1 | |
shift 1; | |
aws cloudformation create-stack --stack-name \ | |
"$(strip-extension $TEMPLATE_FILE)" \ | |
--template-body file://${TEMPLATE_FILE} "$@" | |
} | |
update-stack(){ | |
TEMPLATE_FILE=$1 | |
shift 1; | |
aws cloudformation update-stack --stack-name \ | |
"$(strip-extension $TEMPLATE_FILE)" \ | |
--template-body file://${TEMPLATE_FILE} "$@" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment