Skip to content

Instantly share code, notes, and snippets.

@jayanath
Created April 23, 2022 10:26
Show Gist options
  • Save jayanath/a137e734eebc96bb6668afce79ef58e7 to your computer and use it in GitHub Desktop.
Save jayanath/a137e734eebc96bb6668afce79ef58e7 to your computer and use it in GitHub Desktop.
Ghost Makefile
# Set your default values
REGION={MY-AWS-REGION}
PROFILE={MY-AWS-CLI-PROFILE}
BUCKET={MY-S3-BUCKET}
copy-config-files:
aws s3 sync config s3://$(BUCKET)/blog/config \
--profile $(PROFILE)
create-inception-stack:
aws cloudformation create-stack \
--region $(REGION) \
--profile $(PROFILE) \
--stack-name $(STACK_NAME) \
--template-body file://cloudformation/templates/inception.cfn.yaml
create-blog-host-stack: copy-config-files
aws cloudformation create-stack \
--region $(REGION) \
--profile $(PROFILE) \
--stack-name $(STACK_NAME) \
--capabilities CAPABILITY_NAMED_IAM \
--template-body file://cloudformation/templates/ghost-blog-setup.cfn.yaml
update-inception-stack:
aws cloudformation update-stack \
--region $(REGION) \
--profile $(PROFILE) \
--stack-name $(STACK_NAME) \
--template-body file://cloudformation/templates/inception.cfn.yaml
update-blog-host-stack: copy-config-files
aws cloudformation update-stack \
--region $(REGION) \
--profile $(PROFILE) \
--stack-name $(STACK_NAME) \
--capabilities CAPABILITY_NAMED_IAM \
--template-body file://cloudformation/templates/ghost-blog-setup.cfn.yaml
delete-stack:
aws cloudformation delete-stack \
--profile $(PROFILE) \
--stack-name $(STACK_NAME)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment