Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AWSTemplateFormatVersion: "2010-09-09"
- Metadata:
- Generator: "former2"
- Description: ""
- Resources:
- EC2VPC:
- Type: "AWS::EC2::VPC"
- Properties:
- CidrBlock: "10.0.0.0/16"
- EnableDnsSupport: true
- EnableDnsHostnames: true
- InstanceTenancy: "default"
- Tags:
- -
- Key: "Name"
- Value: "my-canada-vpc"
- EC2Subnet:
- Type: "AWS::EC2::Subnet"
- Properties:
- AvailabilityZone: !Sub "${AWS::Region}a"
- CidrBlock: "10.0.0.0/20"
- VpcId: !Ref EC2VPC
- MapPublicIpOnLaunch: false
- Tags:
- -
- Key: "Name"
- Value: !Sub "my-canada-subnet-public1-${AWS::Region}a"
- EC2Subnet2:
- Type: "AWS::EC2::Subnet"
- Properties:
- AvailabilityZone: !Sub "${AWS::Region}b"
- CidrBlock: "10.0.16.0/20"
- VpcId: !Ref EC2VPC
- MapPublicIpOnLaunch: false
- Tags:
- -
- Key: "Name"
- Value: !Sub "my-canada-subnet-public2-${AWS::Region}b"
- EC2Subnet3:
- Type: "AWS::EC2::Subnet"
- Properties:
- AvailabilityZone: !Sub "${AWS::Region}d"
- CidrBlock: "10.0.32.0/20"
- VpcId: !Ref EC2VPC
- MapPublicIpOnLaunch: false
- Tags:
- -
- Key: "Name"
- Value: !Sub "my-canada-subnet-public3-${AWS::Region}d"
- EC2InternetGateway:
- Type: "AWS::EC2::InternetGateway"
- Properties:
- Tags:
- -
- Key: "Name"
- Value: "my-canada-igw"
- EC2DHCPOptions:
- Type: "AWS::EC2::DHCPOptions"
- Properties:
- DomainName: !Sub "${AWS::Region}.compute.internal"
- EC2VPCDHCPOptionsAssociation:
- Type: "AWS::EC2::VPCDHCPOptionsAssociation"
- Properties:
- DhcpOptionsId: !Ref EC2DHCPOptions
- VpcId: !Ref EC2VPC
- EC2RouteTable:
- Type: "AWS::EC2::RouteTable"
- Properties:
- VpcId: !Ref EC2VPC
- Tags:
- -
- Key: "Name"
- Value: "my-canada-rtb-public"
- EC2RouteTable2:
- Type: "AWS::EC2::RouteTable"
- Properties:
- VpcId: !Ref EC2VPC
- EC2Route:
- Type: "AWS::EC2::Route"
- Properties:
- DestinationCidrBlock: "0.0.0.0/0"
- GatewayId: !Ref EC2InternetGateway
- RouteTableId: !Ref EC2RouteTable
- EC2SubnetRouteTableAssociation:
- Type: "AWS::EC2::SubnetRouteTableAssociation"
- Properties:
- RouteTableId: !Ref EC2RouteTable
- SubnetId: !Ref EC2Subnet2
- EC2SubnetRouteTableAssociation2:
- Type: "AWS::EC2::SubnetRouteTableAssociation"
- Properties:
- RouteTableId: !Ref EC2RouteTable
- SubnetId: !Ref EC2Subnet
- EC2SubnetRouteTableAssociation3:
- Type: "AWS::EC2::SubnetRouteTableAssociation"
- Properties:
- RouteTableId: !Ref EC2RouteTable
- SubnetId: !Ref EC2Subnet3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement