primary-replica/cf-service-primary.yml [326:384]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  Cpu: !Ref GerritCPU
                  Memory: !Ref GerritRAM
                  PortMappings:
                    - ContainerPort: !Ref HTTPPort
                      HostPort: !Ref HTTPPort
                      Protocol: tcp
                    - ContainerPort: !Ref SSHPort
                      HostPort: !Ref SSHPort
                      Protocol: tcp
                  LogConfiguration:
                    LogDriver: awslogs
                    Options:
                        awslogs-group: !Ref ClusterStackName
                        awslogs-region: !Ref AWS::Region
                        awslogs-stream-prefix: !Ref EnvironmentName
                  Links:
                    Fn::If:
                      - ShouldEnableXRay
                      -
                        - !FindInMap ['XRay', 'Info', 'ContainerName']
                      - !Ref "AWS::NoValue"
                - Fn::If:
                    - ShouldEnableXRay
                    - Name: !FindInMap ['XRay', 'Info', 'ContainerName']
                      Essential: false
                      Image: "amazon/aws-xray-daemon"
                      Cpu: 32
                      MemoryReservation: 256
                      PortMappings:
                        - HostPort: 2000
                          ContainerPort: 2000
                          Protocol: "udp"
                    - !Ref "AWS::NoValue"
            Volumes:
              - Name: !FindInMap ['Gerrit', 'Volume', 'Db']
                Host:
                  SourcePath: !Join ['/', ["/gerrit-mount-point", !FindInMap ['Gerrit', 'Volume', 'Db']]]
              - Name: !FindInMap ['Gerrit', 'Volume', 'Git']
                Host:
                  SourcePath: !Join ['/', ["/gerrit-mount-point", !FindInMap ['Gerrit', 'Volume', 'Git']]]
              - Name: !FindInMap ['Gerrit', 'Volume', 'Data']
                Host:
                  SourcePath: !Join ['/', ["/gerrit-mount-point", !FindInMap ['Gerrit', 'Volume', 'Data']]]
              - Name: !FindInMap ['Gerrit', 'Volume', 'Cache']
                Host:
                  SourcePath: !Join ['/', ["/gerrit-mount-point", !FindInMap ['Gerrit', 'Volume', 'Cache']]]
              - Name: !FindInMap ['Gerrit', 'Volume', 'Index']
                Host:
                  SourcePath: !Join ['/', ["/gerrit-mount-point", !FindInMap ['Gerrit', 'Volume', 'Index']]]
              - Name: !FindInMap ['Gerrit', 'Volume', 'Logs']
                Host:
                  SourcePath: !Join ['/', ["/gerrit-mount-point", !FindInMap ['Gerrit', 'Volume', 'Logs']]]

    GerritHTTPLoadBalancerSG:
      Type: AWS::EC2::SecurityGroup
      Properties:
        VpcId:
          Fn::ImportValue:
            !Join [':', [!Ref 'ClusterStackName', 'VPCId']]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



single-primary/cf-service.yml [302:360]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                  Cpu: !Ref GerritCPU
                  Memory: !Ref GerritRAM
                  PortMappings:
                    - ContainerPort: !Ref HTTPPort
                      HostPort: !Ref HTTPPort
                      Protocol: tcp
                    - ContainerPort: !Ref SSHPort
                      HostPort: !Ref SSHPort
                      Protocol: tcp
                  LogConfiguration:
                    LogDriver: awslogs
                    Options:
                        awslogs-group: !Ref ClusterStackName
                        awslogs-region: !Ref AWS::Region
                        awslogs-stream-prefix: !Ref EnvironmentName
                  Links:
                    Fn::If:
                      - ShouldEnableXRay
                      -
                        - !FindInMap ['XRay', 'Info', 'ContainerName']
                      - !Ref "AWS::NoValue"
                - Fn::If:
                    - ShouldEnableXRay
                    - Name: !FindInMap ['XRay', 'Info', 'ContainerName']
                      Essential: false
                      Image: "amazon/aws-xray-daemon"
                      Cpu: 32
                      MemoryReservation: 256
                      PortMappings:
                        - HostPort: 2000
                          ContainerPort: 2000
                          Protocol: "udp"
                    - !Ref "AWS::NoValue"
            Volumes:
              - Name: !FindInMap ['Gerrit', 'Volume', 'Db']
                Host:
                  SourcePath: !Join ['/', ["/gerrit-mount-point", !FindInMap ['Gerrit', 'Volume', 'Db']]]
              - Name: !FindInMap ['Gerrit', 'Volume', 'Git']
                Host:
                  SourcePath: !Join ['/', ["/gerrit-mount-point", !FindInMap ['Gerrit', 'Volume', 'Git']]]
              - Name: !FindInMap ['Gerrit', 'Volume', 'Data']
                Host:
                  SourcePath: !Join ['/', ["/gerrit-mount-point", !FindInMap ['Gerrit', 'Volume', 'Data']]]
              - Name: !FindInMap ['Gerrit', 'Volume', 'Cache']
                Host:
                  SourcePath: !Join ['/', ["/gerrit-mount-point", !FindInMap ['Gerrit', 'Volume', 'Cache']]]
              - Name: !FindInMap ['Gerrit', 'Volume', 'Index']
                Host:
                  SourcePath: !Join ['/', ["/gerrit-mount-point", !FindInMap ['Gerrit', 'Volume', 'Index']]]
              - Name: !FindInMap ['Gerrit', 'Volume', 'Logs']
                Host:
                  SourcePath: !Join ['/', ["/gerrit-mount-point", !FindInMap ['Gerrit', 'Volume', 'Logs']]]

    GerritHTTPLoadBalancerSG:
      Type: AWS::EC2::SecurityGroup
      Properties:
        VpcId:
          Fn::ImportValue:
            !Join [':', [!Ref 'ClusterStackName', 'VPCId']]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



