apps/ecs/ec2/templates/infrastructure.yaml [73:202]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      CidrBlock: 10.0.0.192/26
      AvailabilityZone:
        Fn::Select:
          - 1
          - Fn::GetAZs: ""
  InternetGateway:
    Type: 'AWS::EC2::InternetGateway'
  GatewayAttachment:
    Type: 'AWS::EC2::VPCGatewayAttachment'
    Properties:
      InternetGatewayId: !Ref InternetGateway
      VpcId: !Ref VPC
  RouteIGW:
    Type: AWS::EC2::Route
    Properties:
      RouteTableId: !Ref PublicRouteTable
      DestinationCidrBlock: 0.0.0.0/0
      GatewayId: !Ref InternetGateway
  NAT1:
    Type: AWS::EC2::NatGateway
    Properties:
      AllocationId:
        Fn::GetAtt:
        - EIP1
        - AllocationId
      SubnetId: !Ref PublicSubnet1
  EIP1:
    Type: AWS::EC2::EIP
    Properties:
      Domain: vpc
  Route1:
    Type: AWS::EC2::Route
    Properties:
      RouteTableId:
        Ref: PrivateRouteTable1
      DestinationCidrBlock: 0.0.0.0/0
      NatGatewayId:
        Ref: NAT1
  NAT2:
    Type: AWS::EC2::NatGateway
    Properties:
      AllocationId:
        Fn::GetAtt:
        - EIP2
        - AllocationId
      SubnetId: !Ref PublicSubnet2
  EIP2:
    Type: AWS::EC2::EIP
    Properties:
      Domain: vpc
  Route2:
    Type: AWS::EC2::Route
    Properties:
      RouteTableId: !Ref PrivateRouteTable2
      DestinationCidrBlock: 0.0.0.0/0
      NatGatewayId: !Ref NAT2
  PublicRouteTable:
    Type: AWS::EC2::RouteTable
    Properties:
      VpcId: !Ref VPC
  PrivateRouteTable1:
    Type: AWS::EC2::RouteTable
    Properties:
      VpcId: !Ref VPC
  PrivateRouteTable2:
    Type: AWS::EC2::RouteTable
    Properties:
      VpcId: !Ref VPC
  RouteTableAssociation1:
    Type: AWS::EC2::SubnetRouteTableAssociation
    Properties:
      SubnetId: !Ref PublicSubnet1
      RouteTableId: !Ref PublicRouteTable
  RouteTableAssociation2:
    Type: AWS::EC2::SubnetRouteTableAssociation
    Properties:
      SubnetId: !Ref PublicSubnet2
      RouteTableId: !Ref PublicRouteTable
  RouteTableAssociation3:
    Type: AWS::EC2::SubnetRouteTableAssociation
    Properties:
      SubnetId: !Ref PrivateSubnet1
      RouteTableId: !Ref PrivateRouteTable1
  RouteTableAssociation4:
    Type: AWS::EC2::SubnetRouteTableAssociation
    Properties:
      SubnetId: !Ref PrivateSubnet2
      RouteTableId: !Ref PrivateRouteTable2
  ECSCluster:
    Type: AWS::ECS::Cluster
  ALBPublic:
    Type: AWS::ElasticLoadBalancingV2::LoadBalancer
    Properties:
      Scheme: internet-facing
      SecurityGroups:
        - !GetAtt SecurityGroupPublic.GroupId
      Subnets:
        - !Ref PublicSubnet1
        - !Ref PublicSubnet2
  ALBPrivate:
    Type: AWS::ElasticLoadBalancingV2::LoadBalancer
    Properties:
      Scheme: internal
      SecurityGroups:
        - !GetAtt SecurityGroupWebapp.GroupId
      Subnets:
        - !Ref PrivateSubnet1
        - !Ref PrivateSubnet2
  SecurityGroupPublic:
    Type: AWS::EC2::SecurityGroup
    Properties:
      GroupName: ALBPublic
      GroupDescription: AllowWebTraffic
      VpcId: !Ref VPC
      SecurityGroupIngress:
        - IpProtocol: tcp
          FromPort: 80
          ToPort: 80
          CidrIp: 0.0.0.0/0
  SecurityGroupWebapp:
    Type: AWS::EC2::SecurityGroup
    Properties:
      GroupName: WebAppSecurityGroup
      GroupDescription: WebAppSecurityGroupRules
      VpcId: !Ref VPC
  IngressRuleWebapp:
    Type: AWS::EC2::SecurityGroupIngress
    Properties:
      IpProtocol: tcp
      FromPort: 8080
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



apps/ecs/ecs-cli/infra.yaml [39:168]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      CidrBlock: 10.0.0.192/26
      AvailabilityZone:
        Fn::Select:
          - 1
          - Fn::GetAZs: ""
  InternetGateway:
    Type: 'AWS::EC2::InternetGateway'
  GatewayAttachment:
    Type: 'AWS::EC2::VPCGatewayAttachment'
    Properties:
      InternetGatewayId: !Ref InternetGateway
      VpcId: !Ref VPC
  RouteIGW:
    Type: AWS::EC2::Route
    Properties:
      RouteTableId: !Ref PublicRouteTable
      DestinationCidrBlock: 0.0.0.0/0
      GatewayId: !Ref InternetGateway
  NAT1:
    Type: AWS::EC2::NatGateway
    Properties:
      AllocationId:
        Fn::GetAtt:
        - EIP1
        - AllocationId
      SubnetId: !Ref PublicSubnet1
  EIP1:
    Type: AWS::EC2::EIP
    Properties:
      Domain: vpc
  Route1:
    Type: AWS::EC2::Route
    Properties:
      RouteTableId:
        Ref: PrivateRouteTable1
      DestinationCidrBlock: 0.0.0.0/0
      NatGatewayId:
        Ref: NAT1
  NAT2:
    Type: AWS::EC2::NatGateway
    Properties:
      AllocationId:
        Fn::GetAtt:
        - EIP2
        - AllocationId
      SubnetId: !Ref PublicSubnet2
  EIP2:
    Type: AWS::EC2::EIP
    Properties:
      Domain: vpc
  Route2:
    Type: AWS::EC2::Route
    Properties:
      RouteTableId: !Ref PrivateRouteTable2
      DestinationCidrBlock: 0.0.0.0/0
      NatGatewayId: !Ref NAT2
  PublicRouteTable:
    Type: AWS::EC2::RouteTable
    Properties:
      VpcId: !Ref VPC
  PrivateRouteTable1:
    Type: AWS::EC2::RouteTable
    Properties:
      VpcId: !Ref VPC
  PrivateRouteTable2:
    Type: AWS::EC2::RouteTable
    Properties:
      VpcId: !Ref VPC
  RouteTableAssociation1:
    Type: AWS::EC2::SubnetRouteTableAssociation
    Properties:
      SubnetId: !Ref PublicSubnet1
      RouteTableId: !Ref PublicRouteTable
  RouteTableAssociation2:
    Type: AWS::EC2::SubnetRouteTableAssociation
    Properties:
      SubnetId: !Ref PublicSubnet2
      RouteTableId: !Ref PublicRouteTable
  RouteTableAssociation3:
    Type: AWS::EC2::SubnetRouteTableAssociation
    Properties:
      SubnetId: !Ref PrivateSubnet1
      RouteTableId: !Ref PrivateRouteTable1
  RouteTableAssociation4:
    Type: AWS::EC2::SubnetRouteTableAssociation
    Properties:
      SubnetId: !Ref PrivateSubnet2
      RouteTableId: !Ref PrivateRouteTable2
  ECSCluster:
    Type: AWS::ECS::Cluster
  ALBPublic:
    Type: AWS::ElasticLoadBalancingV2::LoadBalancer
    Properties:
      Scheme: internet-facing
      SecurityGroups:
        - !GetAtt SecurityGroupPublic.GroupId
      Subnets:
        - !Ref PublicSubnet1
        - !Ref PublicSubnet2
  ALBPrivate:
    Type: AWS::ElasticLoadBalancingV2::LoadBalancer
    Properties:
      Scheme: internal
      SecurityGroups:
        - !GetAtt SecurityGroupWebapp.GroupId
      Subnets:
        - !Ref PrivateSubnet1
        - !Ref PrivateSubnet2
  SecurityGroupPublic:
    Type: AWS::EC2::SecurityGroup
    Properties:
      GroupName: ALBPublic
      GroupDescription: AllowWebTraffic
      VpcId: !Ref VPC
      SecurityGroupIngress:
        - IpProtocol: tcp
          FromPort: 80
          ToPort: 80
          CidrIp: 0.0.0.0/0
  SecurityGroupWebapp:
    Type: AWS::EC2::SecurityGroup
    Properties:
      GroupName: WebAppSecurityGroup
      GroupDescription: WebAppSecurityGroupRules
      VpcId: !Ref VPC
  IngressRuleWebapp:
    Type: AWS::EC2::SecurityGroupIngress
    Properties:
      IpProtocol: tcp
      FromPort: 8080
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



