Skip to content

Instantly share code, notes, and snippets.

@stojg
Created July 26, 2014 06:58
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 stojg/2ee6602111a6c05920f1 to your computer and use it in GitHub Desktop.
Save stojg/2ee6602111a6c05920f1 to your computer and use it in GitHub Desktop.
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Parameters" : {
"InstanceType" : {
"Description" : "WebServer EC2 instance type",
"Type" : "String",
"Default" : "m1.small"
}
"KeyName" : {
"Description" : "The EC2 Key Pair to allow SSH access to the instances",
"Type" : "String"
},
"SwarmSize" : {
"Type" : "Number",
"Default" : "1",
"MinValue" : "1"
}
},
"LocustGroup" : {
"Type" : "AWS::AutoScaling::AutoScalingGroup",
"Properties" : {
"AvailabilityZones" : { "Fn::GetAZs" : ""},
"LaunchConfigurationName" : { "Ref" : "LaunchConfig" },
"MinSize" : {"Ref": "SwarmSize"},
"MaxSize" : {"Ref": "SwarmSize"},
}
},
"LaunchConfig" : {
"Type" : "AWS::AutoScaling::LaunchConfiguration",
"Properties" : {
"KeyName" : { "Ref" : "KeyName" },
"ImageId" : "ami-something,
"UserData" : { "Fn::Base64": {"Fn::Join": ["", [
"#!/bin/bash -v\n",
"echo 'hello'\n"
]]}},
"SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ],
"InstanceType" : { "Ref" : "InstanceType" }
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment