PreLab/0.0-PreLab-DMSLab_instructor_CFN.yaml [248:340]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PreferredBackupWindow: 04:00-04:30
      PreferredMaintenanceWindow: sun:05:20-sun:05:50
      DBName: sportstickets
      Engine: postgres
      EngineVersion: '11.5'
      LicenseModel: postgresql-license
      DBSubnetGroupName: !Ref DMSLabDefaultDBSubnet
      DBParameterGroupName: !Ref DMSLabDBPG
      VPCSecurityGroups:
        - !Ref DMSLabDBSG
      Tags:
        -
          Key: workload-type
          Value: other
  DMSLabDefaultDBSubnet:
    Type: AWS::RDS::DBSubnetGroup
    Properties:
      DBSubnetGroupDescription: Created from the RDS Management Console
      SubnetIds:
        - !Ref RDSSubNet
        - !Ref EC2SubNet
        - !Ref RDSSubNet2
  DMSLabDBPG:
    Type: AWS::RDS::DBParameterGroup
    Properties:
      Description: Parameter for Ticket RedshiftDatabaseName
      Family: postgres11
      Parameters:
        rds.logical_replication: '1'
        wal_sender_timeout: '0'
        max_wal_senders: '20'
        max_replication_slots: '50'
  DMSLabSG:
    Type: AWS::EC2::SecurityGroup
    Properties:
      GroupDescription: EC2 Security Group
      VpcId: !Ref DMSInstructorVPC
  DMSLabDBSG:
    Type: AWS::EC2::SecurityGroup
    Properties:
      GroupDescription: RDS Security Group
      VpcId: !Ref DMSInstructorVPC
      Tags:
        -
          Key: Name
          Value: DMSLabRDS-SG
  DMSLabGWAttachement:
    Type: AWS::EC2::VPCGatewayAttachment
    Properties:
      VpcId: !Ref DMSInstructorVPC
      InternetGatewayId: !Ref DMSLabIGW
  SubnetRoute1:
    Type: AWS::EC2::SubnetRouteTableAssociation
    Properties:
      RouteTableId: !Ref DMSLabRouteTable
      SubnetId: !Ref RDSSubNet2
  SubnetRoute2:
    Type: AWS::EC2::SubnetRouteTableAssociation
    Properties:
      RouteTableId: !Ref DMSLabRouteTable
      SubnetId: !Ref RDSSubNet
  SubnetRoute3:
    Type: AWS::EC2::SubnetRouteTableAssociation
    Properties:
      RouteTableId: !Ref DMSLabRouteTable
      SubnetId: !Ref EC2SubNet
  InternetRoute:
    Type: AWS::EC2::Route
    Properties:
      DestinationCidrBlock: 0.0.0.0/0
      RouteTableId: !Ref DMSLabRouteTable
      GatewayId: !Ref DMSLabIGW
    DependsOn: DMSLabGWAttachement
  DHCPAssociation:
    Type: AWS::EC2::VPCDHCPOptionsAssociation
    Properties:
      VpcId: !Ref DMSInstructorVPC
      DhcpOptionsId: !Ref DMSLabDHCPOptions
  SGIngress1:
    Type: AWS::EC2::SecurityGroupIngress
    Properties:
      GroupId: !Ref DMSLabSG
      IpProtocol: tcp
      FromPort: 22
      ToPort: 22
      CidrIp: 0.0.0.0/0
  SGIngress2:
    Type: AWS::EC2::SecurityGroupIngress
    Properties:
      GroupId: !Ref DMSLabDBSG
      IpProtocol: tcp
      FromPort: 5432
      ToPort: 5432
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



PreLab/central-template-environment-setup.yaml [282:374]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PreferredBackupWindow: 04:00-04:30
      PreferredMaintenanceWindow: sun:05:20-sun:05:50
      DBName: sportstickets
      Engine: postgres
      EngineVersion: '11.5'
      LicenseModel: postgresql-license
      DBSubnetGroupName: !Ref DMSLabDefaultDBSubnet
      DBParameterGroupName: !Ref DMSLabDBPG
      VPCSecurityGroups:
        - !Ref DMSLabDBSG
      Tags:
        -
          Key: workload-type
          Value: other
  DMSLabDefaultDBSubnet:
    Type: AWS::RDS::DBSubnetGroup
    Properties:
      DBSubnetGroupDescription: Created from the RDS Management Console
      SubnetIds:
        - !Ref RDSSubNet
        - !Ref EC2SubNet
        - !Ref RDSSubNet2
  DMSLabDBPG:
    Type: AWS::RDS::DBParameterGroup
    Properties:
      Description: Parameter for Ticket RedshiftDatabaseName
      Family: postgres11
      Parameters:
        rds.logical_replication: '1'
        wal_sender_timeout: '0'
        max_wal_senders: '20'
        max_replication_slots: '50'
  DMSLabSG:
    Type: AWS::EC2::SecurityGroup
    Properties:
      GroupDescription: EC2 Security Group
      VpcId: !Ref DMSInstructorVPC
  DMSLabDBSG:
    Type: AWS::EC2::SecurityGroup
    Properties:
      GroupDescription: RDS Security Group
      VpcId: !Ref DMSInstructorVPC
      Tags:
        -
          Key: Name
          Value: DMSLabRDS-SG
  DMSLabGWAttachement:
    Type: AWS::EC2::VPCGatewayAttachment
    Properties:
      VpcId: !Ref DMSInstructorVPC
      InternetGatewayId: !Ref DMSLabIGW
  SubnetRoute1:
    Type: AWS::EC2::SubnetRouteTableAssociation
    Properties:
      RouteTableId: !Ref DMSLabRouteTable
      SubnetId: !Ref RDSSubNet2
  SubnetRoute2:
    Type: AWS::EC2::SubnetRouteTableAssociation
    Properties:
      RouteTableId: !Ref DMSLabRouteTable
      SubnetId: !Ref RDSSubNet
  SubnetRoute3:
    Type: AWS::EC2::SubnetRouteTableAssociation
    Properties:
      RouteTableId: !Ref DMSLabRouteTable
      SubnetId: !Ref EC2SubNet
  InternetRoute:
    Type: AWS::EC2::Route
    Properties:
      DestinationCidrBlock: 0.0.0.0/0
      RouteTableId: !Ref DMSLabRouteTable
      GatewayId: !Ref DMSLabIGW
    DependsOn: DMSLabGWAttachement
  DHCPAssociation:
    Type: AWS::EC2::VPCDHCPOptionsAssociation
    Properties:
      VpcId: !Ref DMSInstructorVPC
      DhcpOptionsId: !Ref DMSLabDHCPOptions
  SGIngress1:
    Type: AWS::EC2::SecurityGroupIngress
    Properties:
      GroupId: !Ref DMSLabSG
      IpProtocol: tcp
      FromPort: 22
      ToPort: 22
      CidrIp: 0.0.0.0/0
  SGIngress2:
    Type: AWS::EC2::SecurityGroupIngress
    Properties:
      GroupId: !Ref DMSLabDBSG
      IpProtocol: tcp
      FromPort: 5432
      ToPort: 5432
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



