-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswm-buildEC2
110 lines (95 loc) · 3.33 KB
/
swm-buildEC2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "SWM Instances",
"Parameters" : {
"StackVersion" : {
"Default" : "2016-03-05 - Need to also add the route table to the nat instance",
"Type" : "String",
"Description" : ""
},
"keyPairName" : {
"Default" : "myolsprod",
"Description" : "The name of an EC2 Key Pair to allow SSH access to the instance.",
"Type" : "String"
},
"WebServerPort" : {
"Description" : "TCP/IP port of the web server",
"Type" : "String",
"Default" : "80"
},
"EnviromentName" : {
"Description" : "Environment type.",
"Default" : "swm-prod",
"Type" : "String",
"AllowedValues" : [
"swm-staging",
"swm-prod"
],
"ConstraintDescription" : "must specify : swm-staging, swm-prod"
},
"BuildAMI" : {
"Default" : "ami-11032472",
"Type" : "String",
"Description" : "AMI for the Build-Box instance"
},
"SecurityGroupIdTier0" : {
"Default" : "sg",
"Description" : "Security group For Build-Box",
"Type" : "List<AWS::EC2::SecurityGroup::Id>"
},
"Tier0SG" : {
"Default" : "sg",
"Description" : "Security group For Build-Box",
"Type" : "String"
},
"Tier0PublicSubnetAZ2a" : {
"Default" : "subnet",
"Type" : "String",
"Description" : "Public subnet 2a"
}
},
"Resources" : {
"Instance2JumpBoxTier0" : {
"Type" : "AWS::EC2::Instance",
"Properties" : {
"Tags" : [
{
"Key" : "Name",
"Value" : {
"Fn::Join" : [
"",
[
"Build-Box",
{
"Ref" : "EnviromentName"
},
"VPCInstance"
]
]
}
}
],
"ImageId" : {
"Ref" : "BuildAMI"
},
"KeyName" : {
"Ref" : "keyPairName"
},
"EbsOptimized" : false,
"DisableApiTermination" : false,
"InstanceType" : "ti.micro",
"NetworkInterfaces" : [
{
"AssociatePublicIpAddress" : true,
"SubnetId" : {
"Ref" : "Tier0PublicSubnetAZ2a"
},
"GroupSet" : {
"Ref" : "SecurityGroupIdTier0"
}
}
]
}
}
}
}