Skip to content

Instantly share code, notes, and snippets.

@phobologic
Created May 23, 2015 04:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phobologic/d4e4368e4befa0121240 to your computer and use it in GitHub Desktop.
Save phobologic/d4e4368e4befa0121240 to your computer and use it in GitHub Desktop.
# git diff
diff --git a/Nested-Parent-Template.py b/Nested-Parent-Template.py
index 14311ca..b2d39fb 100644
--- a/Nested-Parent-Template.py
+++ b/Nested-Parent-Template.py
@@ -24,12 +24,12 @@ KeyPair = t.add_parameter(Parameter(
ChildTemplate1 = t.add_resource(cloudformation.Stack(
"ChildTempate1",
- TemplateURL="https://s3.amazonaws.com/my.first.bucket.test/ChildJSON",
+ TemplateURL="https://s3.amazonaws.com/phobologic-test-bucket/ChildJSON",
Parameters={
- "ELBSubnets": Ref(ELBSubnets),
- "LCSecurityGroups": Ref(LCSecurityGroups),
- "KeyPair": Ref(KeyPair)
+ "ELBSubnets": Join(",", Ref(ELBSubnets)),
+ "LCSecurityGroups": Join(",", Ref(LCSecurityGroups)),
+ "LCKeyPair": Ref(KeyPair)
}
))
-print(t.to_json())
\ No newline at end of file
+print(t.to_json())
diff --git a/ParentJSON b/ParentJSON
index fc19c56..9a98b38 100644
--- a/ParentJSON
+++ b/ParentJSON
@@ -20,16 +20,26 @@
"Properties": {
"Parameters": {
"ELBSubnets": {
- "Ref": "ELBSubnets"
+ "Fn::Join": [
+ ",",
+ {
+ "Ref": "ELBSubnets"
+ }
+ ]
},
- "KeyPair": {
+ "LCKeyPair": {
"Ref": "LCKeyPair"
},
"LCSecurityGroups": {
- "Ref": "LCSecurityGroups"
+ "Fn::Join": [
+ ",",
+ {
+ "Ref": "LCSecurityGroups"
+ }
+ ]
}
},
- "TemplateURL": "https://s3.amazonaws.com/my.first.bucket.test/ChildJSON"
+ "TemplateURL": "https://s3.amazonaws.com/phobologic-test-bucket/ChildJSON"
},
"Type": "AWS::CloudFormation::Stack"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment