Skip to content

Instantly share code, notes, and snippets.

@fernandostc
Created April 28, 2020 03:22
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 fernandostc/6bfac6d05e71daeb48edeb9b52de9561 to your computer and use it in GitHub Desktop.
Save fernandostc/6bfac6d05e71daeb48edeb9b52de9561 to your computer and use it in GitHub Desktop.
Resources:
EC2Instance:
Type: AWS::EC2::Instance
Properties:
InstanceType:
Ref: InstanceType
SecurityGroups:
- Ref: InstanceSecurityGroup
KeyName:
Ref: Test
Monitoring: 'false'
IamInstanceProfile:
- Ref: ProfileStageEnv
ImageId:
Fn::FindInMap:
- AWSRegionArch2AMI
- Ref: AWS::Region
- Fn::FindInMap:
- AWSInstanceType2Arch
- Ref: InstanceType
- Arch
Tags:
-
Key: "Environment"
Value: "Stage"
-
Key: "Role"
Value: "Security"
-
Key: "Owner"
Value: "SecTeam"
-
Key: "Name"
Value: "Stage-EC2-Lab_Env"
InstanceSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
GroupDescription: Enable SSH access via port 22
GroupName: SecinCloud
SecurityGroupIngress:
- IpProtocol: tcp
FromPort: '22'
ToPort: '22'
CidrIp:
Ref: SSHLocation
Tags:
-
Key: "Environment"
Value: "Stage"
-
Key: "Role"
Value: "Security"
-
Key: "Owner"
Value: "SecTeam"
-
Key: "Name"
Value: "Stage-SecGroup-Lab_Env"
IamInstanceProfile:
Type: AWS::IAM::InstanceProfile
Properties:
InstanceProfileName: ProfileStageEnv
Path: String
Roles:
- String
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment