forked from msangui/aws-cloudformation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
single-instance.template.json
46 lines (46 loc) · 1.03 KB
/
single-instance.template.json
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
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Launch single EC2 Instance",
"Resources": {
"MyInstance": {
"Type": "AWS::EC2::Instance",
"Properties": {
"AvailabilityZone": "us-east-1a",
"InstanceType": "t2.micro",
"ImageId": "ami-0baf67670ca0f3719",
"SecurityGroups": [
{
"Ref": "MySG"
}
],
"KeyName": "ec2key",
"Tags": [
{
"Key": "Name",
"Value": "Test Instance"
}
]
}
},
"MySG": {
"Type": "AWS::EC2::SecurityGroup",
"Properties": {
"GroupDescription": "Enable HTTP & SSH access",
"SecurityGroupIngress": [
{
"IpProtocol": "tcp",
"FromPort": "22",
"ToPort": "22",
"CidrIp": "0.0.0.0/0"
},
{
"IpProtocol": "tcp",
"FromPort": "80",
"ToPort": "80",
"CidrIp": "0.0.0.0/0"
}
]
}
}
}
}