Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.83 KB | None | 0 0
  1. {
  2. "AWSTemplateFormatVersion": "2010-09-09",
  3. "Description": "Create ubuntu 16.04 server from Amazon AMI ",
  4. "Parameters":
  5. {
  6. "SSHKeyName":
  7. {
  8. "Description": "Name of an existing EC2 KeyPair to enable SSH access to the instance",
  9. "Type": "AWS::EC2::KeyPair::KeyName",
  10. "Default": "salesfusion_wsfcva",
  11. "ConstraintDescription": "must be the name of an existing EC2 KeyPair."
  12. },
  13.  
  14. "EC2SubnetGroup":
  15. {
  16. "Type": "String",
  17. "Default": "subnet-af58efc1",
  18. "Description": "Subnet where you want EC2 to run"
  19. },
  20.  
  21. "ImgId":
  22. {
  23. "Type": "String",
  24. "Default": "ami-d15a75c7",
  25. "Description": "Image id name to create EC2"
  26. },
  27.  
  28. "InstanceType":
  29. {
  30. "Description": "EC2 instance type",
  31. "Type": "String",
  32. "Default": "c4.large",
  33. "AllowedValues": ["t1.micro", "t2.nano", "t2.micro", "t2.small", "t2.medium", "t2.large", "t2.2xlarge", "m1.small", "m1.medium", "m1.large", "m1.xlarge", "m2.xlarge", "m2.2xlarge", "m2.4xlarge", "m3.medium", "m3.large", "m3.xlarge", "m3.2xlarge", "m4.large", "m4.xlarge", "m4.2xlarge", "m4.4xlarge", "m4.10xlarge", "c1.medium", "c1.xlarge", "c3.large", "c3.xlarge", "c3.2xlarge", "c3.4xlarge", "c3.8xlarge", "c4.large", "c4.xlarge", "c4.2xlarge", "c4.4xlarge", "c4.8xlarge", "g2.2xlarge", "g2.8xlarge", "r3.large", "r3.xlarge", "r3.2xlarge", "r3.4xlarge", "r3.8xlarge", "i2.xlarge", "i2.2xlarge", "i2.4xlarge", "i2.8xlarge", "d2.xlarge", "d2.2xlarge", "d2.4xlarge", "d2.8xlarge", "hi1.4xlarge", "hs1.8xlarge", "cr1.8xlarge", "cc2.8xlarge", "cg1.4xlarge"],
  34. "ConstraintDescription": "must be a valid EC2 instance type."
  35. },
  36.  
  37. "VpcIds":
  38. {
  39. "Description": "Specify/Select only one VPC for Security group to be created under",
  40. "Type": "String",
  41. "Default": "vpc-f55ee99b"
  42. },
  43.  
  44. "CidIp":
  45. {
  46. "Description": "The IP address range that can be used to SSH to the EC2 instances",
  47. "Type": "String",
  48. "MinLength": "9",
  49. "MaxLength": "18",
  50. "Default": "0.0.0.0/0",
  51. "AllowedPattern": "(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})/(\\d{1,2})",
  52. "ConstraintDescription": "must be a valid IP CIDR range of the form x.x.x.x/x."
  53. }
  54. },
  55.  
  56. "Resources":
  57. {
  58. "EC2Instance":
  59. {
  60. "Type": "AWS::EC2::Instance",
  61. "Properties":
  62. {
  63. "InstanceType":
  64. {
  65. "Ref": "InstanceType"
  66. },
  67. "AvailabilityZone" : "us-east-1a",
  68. "KeyName":
  69. {
  70. "Ref": "SSHKeyName"
  71. },
  72. "ImageId":
  73. {
  74. "Ref": "ImgId"
  75. },
  76. "NetworkInterfaces": [
  77. {
  78. "AssociatePublicIpAddress": true,
  79. "DeviceIndex": "0",
  80. "DeleteOnTermination": false,
  81. "SubnetId":
  82. {
  83. "Ref": "EC2SubnetGroup"
  84. }
  85. }],
  86. "SecurityGroups" : [ "sg-9493d3f1", "sg-681b800d", "sg-1439e77b", "sg-67399f08" ],
  87. "Tags": [
  88. {
  89. "Key": "Name",
  90. "Value": "test"
  91. }]
  92. }
  93. }
  94.  
  95. },
  96.  
  97. "Outputs":
  98. {
  99. "InstanceId":
  100. {
  101. "Description": "InstanceId of the newly created EC2 instance",
  102. "Value":
  103. {
  104. "Ref": "EC2Instance"
  105. }
  106. }
  107. }
  108. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement