-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcfn_template.yaml
More file actions
47 lines (43 loc) · 955 Bytes
/
cfn_template.yaml
File metadata and controls
47 lines (43 loc) · 955 Bytes
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
AWSTemplateFormatVersion: '2010-09-09'
Description: 'ddr'
Resources:
Instance:
Type: AWS::EC2::Instance
Properties:
ImageId: ami-c7f118bf
InstanceType: p2.xlarge
KeyName: !Ref KeyName
SecurityGroups:
- !Ref SecGroup
Tags:
- Key: "Name"
Value: "ddr"
SecGroup:
Type: AWS::EC2::SecurityGroup
Properties:
GroupName: ddr-secgroup
GroupDescription: ddr-secgroup
SecurityGroupIngress:
- IpProtocol: tcp
FromPort: '22'
ToPort: '22'
CidrIp: 0.0.0.0/0
#SecurityGroupEgress:
#- IpProtocol: tcp
# FromPort: '80'
# ToPort: '80'
# CidrIp: 0.0.0.0/0
#Tags:
#- Resource Tag
#VpcId: vpc-5ea44d39
Tags:
- Key: "Name"
Value: "ddr-secgroup"
Parameters:
KeyName:
Default: sshvans
Description: EC2 key name
Type: String
Outputs:
InstanceId:
Value: !Ref Instance