Skip to content

Instantly share code, notes, and snippets.

@esenthil2018
Created January 26, 2022 05:26
Show Gist options
  • Save esenthil2018/5913dcf0865b4ffdd06b6396f19dccd6 to your computer and use it in GitHub Desktop.
Save esenthil2018/5913dcf0865b4ffdd06b6396f19dccd6 to your computer and use it in GitHub Desktop.
Resources:
Ec2Instance:
Type: 'AWS::EC2::Instance'
Properties:
SecurityGroups:
- !Ref InstanceSecurityGroup
KeyName: mykey
ImageId: ''
InstanceSecurityGroup:
Type: 'AWS::EC2::SecurityGroup'
Properties:
GroupDescription: Enable SSH access via port 22
SecurityGroupIngress:
- IpProtocol: tcp
FromPort: 22
ToPort: 22
CidrIp: 0.0.0.0/0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment