Guest User

Untitled

a guest
Oct 23rd, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.80 KB | None | 0 0
  1. "DevVPC": {
  2. "Type" : "AWS::EC2::VPC",
  3. "Description" : "Creation of DEV Vpc",
  4. "Properties" : {
  5. "CidrBlock" : "172.51.0.0/16",
  6. "EnableDnsSupport" : "true",
  7. "EnableDnsHostnames" : "true",
  8. "InstanceTenancy" : "dedicated"
  9. }
  10. },
  11.  
  12. "SubnetOne": {
  13. "Type" : "AWS::EC2::Subnet",
  14. "Properties" : {
  15. "AvailabilityZone" : "us-west-2a",
  16. "CidrBlock" : "172.51.0.0/20",
  17. "MapPublicIpOnLaunch" : "true",
  18. "VpcId" : { "Ref" : "DevVPC" }
  19. }
  20. },
  21.  
  22. "SubnetTwo": {
  23. "Type" : "AWS::EC2::Subnet",
  24. "Properties" : {
  25. "AvailabilityZone" : "us-west-2b",
  26. "CidrBlock" : "172.51.16.0/20",
  27. "MapPublicIpOnLaunch" : "true",
  28. "VpcId" : { "Ref" : "DevVPC" }
  29. }
  30. },
  31.  
  32. "SubnetThree": {
  33. "Type" : "AWS::EC2::Subnet",
  34. "Properties" : {
  35. "AvailabilityZone" : "us-west-2c",
  36. "CidrBlock" : "172.51.32.0/20",
  37. "MapPublicIpOnLaunch" : "true",
  38. "VpcId" : { "Ref" : "DevVPC" }
  39. }
  40. },
  41.  
  42. "DevBatchServersASG" : {
  43. "Type" : "AWS::AutoScaling::AutoScalingGroup",
  44. "Properties" : {
  45. "AvailabilityZones" : { "Fn::FindInMap" : [ "AvailabilityZoneMap", { "Ref" : "EnvType" }, "availabilityZone"] },
  46. "VPCZoneIdentifier" : [ { "Ref" : "SubnetOne", "Ref" : "SubnetTwo", "Ref" : "SubnetThree" } ],
  47. "LaunchConfigurationName" : { "Ref" : "BatchServerLaunchConfiguration" },
  48. "MinSize" : { "Fn::FindInMap" : [ "ScalingMin", { "Ref" : "EnvType" }, "Batch"] },
  49. "MaxSize" : { "Fn::FindInMap" : [ "ScalingMax", { "Ref" : "EnvType" }, "Batch"] },
  50. "TerminationPolicies" : [ "NewestInstance" ],
  51. "MetricsCollection": [
  52. {
  53. "Granularity": "1Minute",
  54. "Metrics": []
  55. }],
  56.  
  57. "Tags" : [
  58. { "Key" : "Name", "Value" : { "Fn::Join" : [ "-", [ { "Ref" : "TeamName" }, { "Ref" : "EnvType" }, "Batch", { "Ref" : "BuildNumber" } ]] }, "PropagateAtLaunch" : "true" },
  59. { "Key" : "Environment", "Value" : "Batch", "PropagateAtLaunch" : "true" },
  60. { "Key" : "EnvironmentType", "Value" : { "Ref" : "EnvType" }, "PropagateAtLaunch" : "true" },
  61. { "Key" : "Team", "Value" : "Angelsense", "PropagateAtLaunch" : "true" }
  62. ]
  63. },
  64.  
  65. "CreationPolicy" : {
  66. "AutoScalingCreationPolicy" : {
  67. "MinSuccessfulInstancesPercent" : "0"
  68. },
  69. "ResourceSignal" : {
  70. "Count": { "Fn::FindInMap" : [ "ScalingMin", { "Ref" : "EnvType" }, "Batch" ] },
  71. "Timeout": "PT10M"
  72. }
  73. }
  74. },
  75.  
  76. "AvailabilityZoneMap" : {
  77. "DEV" : { "availabilityZone" : [ "us-west-2a", "us-west-2b", "us-west-2c" ] },
  78. "Load" : { "availabilityZone" : [ "us-west-2a", "us-west-2b", "us-west-2c" ] },
  79. "Staging" : { "availabilityZone" : [ "us-west-2a", "us-west-2b", "us-west-2c" ] },
  80. "Prod-US" : { "availabilityZone" : [ "us-west-2a", "us-west-2b", "us-west-2c" ] }
  81. },
  82.  
  83. "AvailabilityZones" : { "Fn::FindInMap" : [ "AvailabilityZoneMap", { "Ref" : "EnvType" }, "availabilityZone"] },
Add Comment
Please, Sign In to add comment