Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extend the hello-world example and turn it into a test
- Loading branch information
Showing
8 changed files
with
82 additions
and
13 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM ubuntu | ||
RUN apt-get update && \ | ||
apt-get install -y make | ||
|
||
COPY iidy /usr/local/bin | ||
COPY examples/ /root/examples | ||
COPY Makefile /root/Makefile | ||
WORKDIR /root/ | ||
|
||
ENV AWS_PROFILE sandbox | ||
ENV AWS_REGION us-west-2 |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.PHONY : test | ||
|
||
.DEFAULT_GOAL := test | ||
|
||
test: | ||
@iidy help > /dev/null | ||
@cd examples/hello-world/ && make test | ||
# iidy list-stacks | ||
# iidy create-stack examples/hello-world/stack-args.yaml | ||
# iidy list-stacks --region us-east-1 |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
echo -e "\033[91mEXECUTING: \033[96m $* \033[0m" | ||
|
||
$* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.PHONY : test | ||
|
||
.DEFAULT_GOAL := test | ||
|
||
test: | ||
@mkdir -p demo-tmp/ | ||
@iidy render stack-args.yaml > demo-tmp/stack-args.yaml | ||
@grep StackName demo-tmp/stack-args.yaml | cut -f 2 -d':' > demo-tmp/stack-name | ||
@cp cfn-template.yaml demo-tmp/ | ||
|
||
@./.wrap-bash iidy create-stack demo-tmp/stack-args.yaml | ||
|
||
@./.wrap-bash iidy list-stacks --region us-west-2 --profile sandbox | grep $$(cat demo-tmp/stack-name) | ||
|
||
@./.wrap-bash sed -i.bak s/your-name/Tavis/ demo-tmp/stack-args.yaml | ||
@./.wrap-bash iidy update-stack demo-tmp/stack-args.yaml | ||
|
||
@./.wrap-bash iidy delete-stack --region us-west-2 --profile sandbox --yes $$(cat demo-tmp/stack-name) | ||
|
||
@rm -r demo-tmp |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
Parameters: | ||
Name: | ||
Type: String | ||
Resources: | ||
HelloWorld: | ||
Type: AWS::SNS::Topic | ||
Properties: | ||
DisplayName: HelloWorldIIDY | ||
DisplayName: !Sub "Hello ${Name}}" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,17 @@ | ||
StackName: iidy-demo | ||
$imports: | ||
nameSuffix: random:dashed-name | ||
|
||
StackName: iidy-demo-{{nameSuffix}} | ||
Template: ./cfn-template.yaml # details are irrelevant for the demo | ||
|
||
Profile: sandbox | ||
Region: us-west-2 | ||
|
||
Parameters: | ||
Name: world | ||
|
||
Tags: | ||
owner: tavis | ||
owner: your-name | ||
project: iidy-demo | ||
environment: development | ||
lifetime: short |