Skip to content

Instantly share code, notes, and snippets.

@AHaydar

AHaydar/block8. Secret

Created Mar 11, 2021
Embed
What would you like to do?
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