Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
feat(contrib/ec2): add optional support for IAM instance profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
sopel committed Dec 1, 2014
1 parent 6884604 commit 28828a7
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions contrib/ec2/deis.template.json
Expand Up @@ -17,6 +17,11 @@
"Description": "Number of nodes in cluster (3-12).",
"Type": "Number"
},
"IamInstanceProfile" : {
"Description" : "(Optional) Set IAM instance profile for Deis hosts (default: none)",
"Type" : "String",
"Default": ""
},
"SSHFrom" : {
"Description" : "Lockdown SSH access to the Deis hosts (default: can be accessed from anywhere)",
"Type" : "String",
Expand Down Expand Up @@ -106,6 +111,17 @@
}
},

"Conditions" : {
"UseIamInstanceProfile" : {
"Fn::Not" : [{
"Fn::Equals" : [
{ "Ref" : "IamInstanceProfile" },
""
]
}]
}
},

"Resources" : {
"VPC" : {
"Type" : "AWS::EC2::VPC",
Expand Down Expand Up @@ -221,6 +237,13 @@
"Properties": {
"ImageId" : { "Fn::FindInMap" : [ "CoreOSAMIs", { "Ref" : "AWS::Region" }, { "Ref" : "EC2VirtualizationType" }]},
"InstanceType": {"Ref": "InstanceType"},
"IamInstanceProfile" : {
"Fn::If" : [
"UseIamInstanceProfile",
{ "Ref" : "IamInstanceProfile" },
{ "Ref" : "AWS::NoValue" }
]
},
"KeyName": {"Ref": "KeyPair"},
"UserData" : { "Fn::Base64": { "Fn::Join": [ "", [ ] ] } },
"AssociatePublicIpAddress": {"Ref": "AssociatePublicIP"},
Expand Down

0 comments on commit 28828a7

Please sign in to comment.