Last active
September 12, 2019 14:40
-
-
Save irgeek/457802bd7ceea5170c8007e45fbac879 to your computer and use it in GitHub Desktop.
Minimal test case to show aws-cli cloudformation package regression.
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
--- | |
Resources: | |
GrandChild: | |
Type: AWS::CloudFormation::Stack | |
Properties: | |
TemplateURL: grandchild.pyaml |
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
--- | |
Resources: | |
Bucket: | |
Type: AWS::S3::Bucket | |
Properties: | |
BucketName: grandchild-stack-bucket |
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
S3_BUCKET := cf-templates-1wwumiwcx5krz-ap-southeast-2 | |
S3_PREFIX := 8b87ca7b-869e-4401-baa0-ad0522e32f21 | |
AWSCLI := .venv/bin/aws | |
all: parent.pyaml | |
parent.pyaml: child.pyaml | |
child.pyaml: grandchild.pyaml | |
grandchild.pyaml: | |
%.pyaml: %.yaml .venv | |
$(AWSCLI) cloudformation package \ | |
--template-file $< \ | |
--s3-bucket $(S3_BUCKET) \ | |
--s3-prefix $(S3_PREFIX) \ | |
--output-template-file $@ | |
.venv: | |
@python3 -mvenv .venv | |
@.venv/bin/pip --quiet install --upgrade pip | |
ifneq ($(VERSION),) | |
@.venv/bin/pip --quiet install awscli==$(VERSION) | |
else | |
@.venv/bin/pip --quiet install awscli | |
endif | |
@$(AWSCLI) --version | |
@echo | |
.PHONY: clean | |
clean: | |
@find * -type f -name '*.pyaml' -delete | |
@rm -rf .venv |
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
--- | |
Resources: | |
Child: | |
Type: AWS::CloudFormation::Stack | |
Properties: | |
TemplateURL: child.pyaml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment