-
Notifications
You must be signed in to change notification settings - Fork 0
/
simple-instance2.json
56 lines (41 loc) · 1.26 KB
/
simple-instance2.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
47
48
49
50
51
52
53
54
55
56
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Deploy a simple Amazon Linux Instance and allow SSH connectivity.",
"Parameters": {
"KeyName" : {
"Description" : "EC2 Key Pair for SSH Access, you must have created these prior to running this.",
"Type" : "String",
"Default" : "cloudform-key"
}
},
"Resources": {
"SimpleInstance" : {
"Type" : "AWS::EC2::Instance",
"Properties" : {
"KeyName" : { "Ref" : "KeyName" },
"InstanceType" : "t2.micro" ,
"ImageId" : "ami-8c1be5f6",
"NetworkInterfaces" : [{
"GroupSet" : [{ "Ref" : "SimpleInstanceSg" }],
"AssociatePublicIpAddress" : "true",
"DeviceIndex" : "0",
"DeleteOnTermination" : "true",
"SubnetId" : "subnet-a9bae785"
}]
}
},
"SimpleInstanceSg" : {
"Type" : "AWS::EC2::SecurityGroup",
"Properties" : {
"GroupDescription" : "Enable SSH access via port 22",
"VpcId": "vpc-7c5f6905",
"SecurityGroupIngress" : [ {
"IpProtocol" : "tcp",
"FromPort" : "22",
"ToPort" : "22",
"CidrIp" : "0.0.0.0/0"
} ]
}
}
}
}