Last active
March 25, 2020 08:17
-
-
Save tasugim/6d90bf924e6a91a4113bfd075cce3371 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "Parameters": { | |
| "KeyName": { | |
| "Description": "The EC2 Key Pair to allow SSH", | |
| "Type": "AWS::EC2::KeyPair::KeyName" | |
| } | |
| }, | |
| "Resources": { | |
| "Ec2Instance": { | |
| "Type": "AWS::EC2::Instance", | |
| "Properties": { | |
| "SecurityGroups": [ | |
| { | |
| "Ref": "InstanceSecurityGroup" | |
| }, | |
| "MyExistingSecurityGroup" | |
| ], | |
| "KeyName": { | |
| "Ref": "KeyName" | |
| }, | |
| "ImageID": "ami-7a11e213" | |
| } | |
| }, | |
| "InstanceSecurityGroup": { | |
| "Type": "AWS::EC2::SecurityGroup", | |
| "Properties": { | |
| "GroupDescription": "Enable SSH access", | |
| "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