github.com/openshift/installer@v1.4.17/upi/aws/cloudformation/01_vpc_01_carrier_gateway.yaml (about)

     1  AWSTemplateFormatVersion: 2010-09-09
     2  Description: Template for Creating Wavelength Zone Gateway (Carrier Gateway).
     3  
     4  Parameters:
     5    VpcId:
     6      Description: VPC ID to associate the Carrier Gateway.
     7      Type: String
     8      AllowedPattern: ^(?:(?:vpc)(?:-[a-zA-Z0-9]+)?\b|(?:[0-9]{1,3}\.){3}[0-9]{1,3})$
     9      ConstraintDescription: VPC ID must be with valid name, starting with vpc-.*.
    10    ClusterName:
    11      Description: Cluster Name or Prefix name to prepend the tag Name for each subnet.
    12      Type: String
    13      AllowedPattern: ".+"
    14      ConstraintDescription: ClusterName parameter must be specified.
    15  
    16  Resources:
    17    CarrierGateway:
    18      Type: "AWS::EC2::CarrierGateway"
    19      Properties:
    20        VpcId: !Ref VpcId
    21        Tags:
    22        - Key: Name
    23          Value: !Join ['-', [!Ref ClusterName, "cagw"]]
    24  
    25    PublicRouteTable:
    26      Type: "AWS::EC2::RouteTable"
    27      Properties:
    28        VpcId: !Ref VpcId
    29        Tags:
    30        - Key: Name
    31          Value: !Join ['-', [!Ref ClusterName, "public-carrier"]]
    32  
    33    PublicRoute:
    34      Type: "AWS::EC2::Route"
    35      DependsOn: CarrierGateway
    36      Properties:
    37        RouteTableId: !Ref PublicRouteTable
    38        DestinationCidrBlock: 0.0.0.0/0
    39        CarrierGatewayId: !Ref CarrierGateway
    40  
    41    S3Endpoint:
    42      Type: AWS::EC2::VPCEndpoint
    43      Properties:
    44        PolicyDocument:
    45          Version: 2012-10-17
    46          Statement:
    47          - Effect: Allow
    48            Principal: '*'
    49            Action:
    50            - '*'
    51            Resource:
    52            - '*'
    53        RouteTableIds:
    54        - !Ref PublicRouteTable
    55        ServiceName: !Join
    56        - ''
    57        - - com.amazonaws.
    58          - !Ref 'AWS::Region'
    59          - .s3
    60        VpcId: !Ref VpcId
    61  
    62  Outputs:
    63    PublicRouteTableId:
    64      Description: Public Route table ID
    65      Value: !Ref PublicRouteTable