From 6c1204c96eee38401364f650120b245ce3a8d737 Mon Sep 17 00:00:00 2001 From: Neal Magee Date: Tue, 27 Feb 2024 13:46:11 -0500 Subject: [PATCH] A bit more complexity --- ec2/cloudformation/ec2-with-s3.yaml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/ec2/cloudformation/ec2-with-s3.yaml b/ec2/cloudformation/ec2-with-s3.yaml index 7efafd3..3245def 100644 --- a/ec2/cloudformation/ec2-with-s3.yaml +++ b/ec2/cloudformation/ec2-with-s3.yaml @@ -23,7 +23,7 @@ Parameters: Type: String MinLength: '9' MaxLength: '18' - Default: 0.0.0.0/0 + Default: 1.2.3.4/32 AllowedPattern: '(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/(\d{1,2})' ConstraintDescription: Must be a valid IP CIDR range of the form x.x.x.x/x. @@ -62,7 +62,7 @@ Resources: Properties: InstanceId: !Ref EC2Instance VolumeId: !Ref AddVolume - Device: /dev/sdh + Device: /dev/sdf DeletionPolicy: Delete InstanceSecurityGroup: @@ -74,6 +74,18 @@ Resources: FromPort: '22' ToPort: '22' CidrIp: !Ref SSHLocation + - IpProtocol: tcp + FromPort: '22' + ToPort: '22' + CidrIp: '128.143.0.0/16' + - IpProtocol: tcp + FromPort: '22' + ToPort: '22' + CidrIp: '199.111.0.0/16' + - IpProtocol: tcp + FromPort: '80' + ToPort: '80' + CidrIp: '0.0.0.0/0' IPAddress: Type: 'AWS::EC2::EIP'