-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathec2_instance.json
More file actions
47 lines (47 loc) · 1.15 KB
/
ec2_instance.json
File metadata and controls
47 lines (47 loc) · 1.15 KB
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
{
"Description": "CloudFormation template for creating an ec2 instance",
"Parameters": {
"KeyName": {
"Description": "Key Pair name",
"Type": "AWS::EC2::KeyPair::KeyName",
"Default": "sandeepaws"
},
"VPC": {
"Type": "AWS::EC2::VPC::Id",
"Default":"vpc-10f0ed77"
},
"Subnet":{
"Type": "AWS::EC2::Subnet::Id",
"Default": "subnet-1cffe747"
},
"InstanceType": {
"Description": "Select one of the possible instance types",
"Type": "String",
"Default": "t2.micro",
"AllowedValues": ["t2.micro", "t2.small", "t2.medium"]
},
"SecurityGroup":{
"Type": "AWS::EC2::SecurityGroup::Id",
"Default" : "sg-6f3bcd11",
"AllowedValues": ["sg-6f3bcd11", "sg-0f4699532075ba569"]
}
},
"Resources":{
"Server": {
"Type": "AWS::EC2::Instance",
"Properties": {
"ImageId": "ami-00fc224d9834053d6",
"InstanceType": {"Ref": "InstanceType"},
"KeyName": {"Ref": "KeyName"},
"SecurityGroupIds": [{"Ref": "SecurityGroup"}],
"SubnetId": {"Ref": "Subnet"}
}
}
},
"Outputs": {
"PublicName": {
"Value": {"Fn::GetAtt": ["Server", "PublicDnsName"]},
"Description": "Public name (connect via SSH)"
}
}
}