Created
July 10, 2020 14:33
-
-
Save ritesh/c4e0e8636a8fa459b14c68804d6e82f6 to your computer and use it in GitHub Desktop.
Makefile for cfn 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
| STACK_NAME=MyStack | |
| TEMPLATE_FILE=template.yaml | |
| CAPABILITIES=CAPABILITY_NAMED_IAM | |
| validate: | |
| aws cloudformation validate-template --template-body file://$(TEMPLATE_FILE) | |
| create-stack: validate | |
| aws cloudformation deploy --template-file $(TEMPLATE_FILE) --stack-name $(STACK_NAME) --capabilities $(CAPABILITIES) --parameter-overrides ProjectId=$(STACK_NAME) | |
| describe-stack: | |
| aws cloudformation describe-stacks --stack-name $(STACK_NAME) | |
| aws cloudformation describe-stack-events --stack-name $(STACK_NAME) | less -S | |
| clean: | |
| aws cloudformation delete-stack --stack-name $(STACK_NAME) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment