You must be logged in to view saved presets
This guided walkthrough includes configuration for the following:
AWSTemplateFormatVersion: '2010-09-09'
Description: ''
Resources:
Vpc:
Type: 'AWS::EC2::VPC'
Properties:
CidrBlock: 10.0.0.0/16
EnableDnsHostnames: true
EnableDnsSupport: true
InstanceTenancy: default
VpcSubnet0:
Type: 'AWS::EC2::Subnet'
Properties:
CidrBlock: 10.0.0.0/24
MapPublicIpOnLaunch: true
VpcId:
Ref: Vpc
AvailabilityZone:
'Fn::Select':
- '0'
- 'Fn::GetAZs':
Ref: 'AWS::Region'
Tags:
- Key: Name
Value: public-az1
VpcSubnet1:
Type: 'AWS::EC2::Subnet'
Properties:
CidrBlock: 10.0.1.0/24
MapPublicIpOnLaunch: true
VpcId:
Ref: Vpc
AvailabilityZone:
'Fn::Select':
- '1'
- 'Fn::GetAZs':
Ref: 'AWS::Region'
Tags:
- Key: Name
Value: public-az2
VpcSubnet2:
Type: 'AWS::EC2::Subnet'
Properties:
CidrBlock: 10.0.2.0/24
MapPublicIpOnLaunch: true
VpcId:
Ref: Vpc
AvailabilityZone:
'Fn::Select':
- '2'
- 'Fn::GetAZs':
Ref: 'AWS::Region'
Tags:
- Key: Name
Value: public-az3
VpcSubnet3:
Type: 'AWS::EC2::Subnet'
Properties:
CidrBlock: 10.0.10.0/24
MapPublicIpOnLaunch: false
VpcId:
Ref: Vpc
AvailabilityZone:
'Fn::Select':
- '0'
- 'Fn::GetAZs':
Ref: 'AWS::Region'
Tags:
- Key: Name
Value: private-az1
VpcSubnet4:
Type: 'AWS::EC2::Subnet'
Properties:
CidrBlock: 10.0.11.0/24
MapPublicIpOnLaunch: false
VpcId:
Ref: Vpc
AvailabilityZone:
'Fn::Select':
- '1'
- 'Fn::GetAZs':
Ref: 'AWS::Region'
Tags:
- Key: Name
Value: private-az2
VpcSubnet5:
Type: 'AWS::EC2::Subnet'
Properties:
CidrBlock: 10.0.12.0/24
MapPublicIpOnLaunch: false
VpcId:
Ref: Vpc
AvailabilityZone:
'Fn::Select':
- '2'
- 'Fn::GetAZs':
Ref: 'AWS::Region'
Tags:
- Key: Name
Value: private-az3
VpcIgw:
Type: 'AWS::EC2::InternetGateway'
Properties: {}
VpcIgwAttachment:
Type: 'AWS::EC2::VPCGatewayAttachment'
Properties:
InternetGatewayId:
Ref: VpcIgw
VpcId:
Ref: Vpc
VpcEipNatGw0:
Type: 'AWS::EC2::EIP'
Properties:
Domain: vpc
VpcNatGw0:
Type: 'AWS::EC2::NatGateway'
Properties:
SubnetId:
Ref: VpcSubnet0
ConnectivityType: public
AllocationId:
'Fn::GetAtt':
- VpcEipNatGw0
- AllocationId
VpcRouteTable0:
Type: 'AWS::EC2::RouteTable'
Properties:
VpcId:
Ref: Vpc
Tags:
- Key: Name
Value: Public Route Table
VpcRouteTable0Assoc0:
Type: 'AWS::EC2::SubnetRouteTableAssociation'
Properties:
RouteTableId:
Ref: VpcRouteTable0
SubnetId:
Ref: VpcSubnet0
VpcRouteTable0Assoc1:
Type: 'AWS::EC2::SubnetRouteTableAssociation'
Properties:
RouteTableId:
Ref: VpcRouteTable0
SubnetId:
Ref: VpcSubnet1
VpcRouteTable0Assoc2:
Type: 'AWS::EC2::SubnetRouteTableAssociation'
Properties:
RouteTableId:
Ref: VpcRouteTable0
SubnetId:
Ref: VpcSubnet2
VpcRouteTable0VpcRoute0:
Type: 'AWS::EC2::Route'
Properties:
DestinationCidrBlock: 0.0.0.0/0
RouteTableId:
Ref: VpcRouteTable0
GatewayId:
Ref: VpcIgw
VpcRouteTable1:
Type: 'AWS::EC2::RouteTable'
Properties:
VpcId:
Ref: Vpc
Tags:
- Key: Name
Value: Private Route Table
VpcRouteTable1Assoc3:
Type: 'AWS::EC2::SubnetRouteTableAssociation'
Properties:
RouteTableId:
Ref: VpcRouteTable1
SubnetId:
Ref: VpcSubnet3
VpcRouteTable1Assoc4:
Type: 'AWS::EC2::SubnetRouteTableAssociation'
Properties:
RouteTableId:
Ref: VpcRouteTable1
SubnetId:
Ref: VpcSubnet4
VpcRouteTable1Assoc5:
Type: 'AWS::EC2::SubnetRouteTableAssociation'
Properties:
RouteTableId:
Ref: VpcRouteTable1
SubnetId:
Ref: VpcSubnet5
VpcRouteTable1VpcRoute0:
Type: 'AWS::EC2::Route'
Properties:
DestinationCidrBlock: 0.0.0.0/0
RouteTableId:
Ref: VpcRouteTable1
NatGatewayId:
Ref: VpcNatGw0
Parameters: {}
Metadata: {}
Conditions: {}