Permalink
Fetching contributors…
Cannot retrieve contributors at this time
47 lines (46 sloc) 1.24 KB
Description: Enables IPv6 addresses
Parameters:
VPCCidrBlock:
Type: String
Description: 'The /16 CIDR block for the VPC'
Default: 10.0.0.0/16
AllowedPattern: '(\d{1,3})\.(\d{1,3})\.0\.0/16'
ConstraintDescription: Must be a valid IP /16 CIDR block
Resources:
Vpc:
Type: AWS::EC2::VPC
Properties:
CidrBlock: !Ref VPCCidrBlock
Tags:
- Key: Name
Value: "Test VPC"
InternetGateway:
Type: AWS::EC2::InternetGateway
AttachGateway:
Type: AWS::EC2::VPCGatewayAttachment
Properties:
VpcId: !Ref Vpc
InternetGatewayId: !Ref InternetGateway
PublicRouteTable:
Type: AWS::EC2::RouteTable
Properties:
VpcId: !Ref Vpc
PublicRoute:
Type: AWS::EC2::Route
DependsOn: InternetGateway
Properties:
RouteTableId: !Ref PublicRouteTable
DestinationCidrBlock: 0.0.0.0/0
GatewayId: !Ref InternetGateway
PublicSubnet:
Type: AWS::EC2::Subnet
Properties:
CidrBlock: !Select [0, !Cidr [!GetAtt 'Vpc.CidrBlock', 1, 8]]
VpcId: !Ref Vpc
PublicSubnetRouteTableAssociation:
Type: AWS::EC2::SubnetRouteTableAssociation
Properties:
SubnetId: !Ref PublicSubnet
RouteTableId: !Ref PublicRouteTable
Transform:
- EnableIPv6