Skip to content

Instantly share code, notes, and snippets.

@AHaydar

AHaydar/block8. Secret

Created March 11, 2021 22:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AHaydar/b5c343f1321ef3e7a9a1ae5a01600b37 to your computer and use it in GitHub Desktop.
Save AHaydar/b5c343f1321ef3e7a9a1ae5a01600b37 to your computer and use it in GitHub Desktop.
AwesomeEC2Instance:
Type: AWS::EC2::Instance
Properties:
InstanceType: t2.micro
ImageId: ami-0947d2ba12ee1ff75
Tags:
- Key: Name
Value: Private Instance
KeyName: !Ref KeyName
NetworkInterfaces:
- AssociatePublicIpAddress: true
DeviceIndex: 0
GroupSet:
- !Ref AwesomeSecurityGroup
SubnetId:
!Ref SubnetPrivate
AwesomeSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
VpcId: !Ref SubnetPrivate
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