Skip to content

Instantly share code, notes, and snippets.

@antklim
Last active March 9, 2018 05:56
Show Gist options
  • Save antklim/e3efd26c2e0986db556f2780cfcb7ce6 to your computer and use it in GitHub Desktop.
Save antklim/e3efd26c2e0986db556f2780cfcb7ce6 to your computer and use it in GitHub Desktop.
PublicSubnet1:
Type: AWS::EC2::Subnet
Properties:
VpcId: !Ref VPC
AvailabilityZone: !Select [ 0, !GetAZs ]
CidrBlock: !Ref PublicSubnet1CIDR
MapPublicIpOnLaunch: true
Tags:
- Key: Name
Value: !Sub ${Namespace}-${Environment}-public-subnet-az1
PublicSubnet2:
Type: AWS::EC2::Subnet
Properties:
VpcId: !Ref VPC
AvailabilityZone: !Select [ 1, !GetAZs ]
CidrBlock: !Ref PublicSubnet2CIDR
MapPublicIpOnLaunch: true
Tags:
- Key: Name
Value: !Sub ${Namespace}-${Environment}-public-subnet-az2
PrivateSubnet1:
Type: AWS::EC2::Subnet
Properties:
VpcId: !Ref VPC
AvailabilityZone: !Select [ 0, !GetAZs ]
CidrBlock: !Ref PrivateSubnet1CIDR
MapPublicIpOnLaunch: false
Tags:
- Key: Name
Value: !Sub ${Namespace}-${Environment}-private-subnet-az1
PrivateSubnet2:
Type: AWS::EC2::Subnet
Properties:
VpcId: !Ref VPC
AvailabilityZone: !Select [ 1, !GetAZs ]
CidrBlock: !Ref PrivateSubnet2CIDR
MapPublicIpOnLaunch: false
Tags:
- Key: Name
Value: !Sub ${Namespace}-${Environment}-private-subnet-az2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment