dcm4chee/dcm4chee-arc-ec2-psql-keycloak.yml [593:669]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Tags:
        - Key: project
          Value: dcm4chee-arc-psql
  LoadBalancer:
    Type: AWS::ElasticLoadBalancingV2::LoadBalancer
    Properties:
      LoadBalancerAttributes:
      - Key: load_balancing.cross_zone.enabled
        Value: "true"
      Scheme: internet-facing
      Subnets:
        - !Ref PublicSubnet1Id
        - !Ref PublicSubnet2Id
      Tags:
      - Key: project
        Value: dcm4chee-arc-psql
      Type: network
      LoadBalancerAttributes:
        - Key: access_logs.s3.enabled
          Value: true
        - Key: access_logs.s3.bucket
          Value: !Join
            - '-'
            - - !Ref LBAccessLogBucketName
              - !Ref AWS::AccountId
              - !Ref AWS::Region
  LBAccessLogBucket:
    Type: AWS::S3::Bucket
    Properties:
      BucketName: !Join
            - '-'
            - - !Ref LBAccessLogBucketName
              - !Ref AWS::AccountId
              - !Ref AWS::Region
      BucketEncryption:
        ServerSideEncryptionConfiguration:
          - ServerSideEncryptionByDefault:
              SSEAlgorithm: AES256
  LBAccessLogBucketPolicy:
    Type: AWS::S3::BucketPolicy
    Properties: 
      Bucket: !Ref LBAccessLogBucket
      PolicyDocument:
        Statement:
          - Action:
              - 's3:PutObject'
            Effect: Allow
            Resource: 
              - !Sub '${LBAccessLogBucket.Arn}/*'
            Principal: 
              AWS: !FindInMap [RegionELBAccountIdMap, !Ref 'AWS::Region', AccountId]
          - Action:
              - 's3:PutObject'
            Effect: Allow
            Resource: 
              - !Sub '${LBAccessLogBucket.Arn}/*'
            Principal: 
              Service: delivery.logs.amazonaws.com
          - Action:
              - 's3:GetBucketAcl'
            Effect: Allow
            Resource: 
              - !Sub ${LBAccessLogBucket.Arn}
            Principal: 
              Service: delivery.logs.amazonaws.com
  LogGroup:
    Type: AWS::Logs::LogGroup
    Properties:
      LogGroupName: /ecs/dcm4chee-arc-psql

  ArcService:
    Type: AWS::ECS::Service
    DependsOn:
    - ArcTCP8080Listener
    - ArcTCP8443Listener
    - ArcTCP11112Listener
    - LdapService
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



dcm4chee/dcm4chee-arc-ec2-psql.yml [487:563]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Tags:
      - Key: project
        Value: dcm4chee-arc-psql
  LoadBalancer:
    Type: AWS::ElasticLoadBalancingV2::LoadBalancer
    Properties:
      LoadBalancerAttributes:
      - Key: load_balancing.cross_zone.enabled
        Value: "true"
      Scheme: internet-facing
      Subnets:
        - !Ref PublicSubnet1Id
        - !Ref PublicSubnet2Id
      Tags:
      - Key: project
        Value: dcm4chee-arc-psql
      Type: network
      LoadBalancerAttributes:
        - Key: access_logs.s3.enabled
          Value: true
        - Key: access_logs.s3.bucket
          Value: !Join
            - '-'
            - - !Ref LBAccessLogBucketName
              - !Ref AWS::AccountId
              - !Ref AWS::Region
  LBAccessLogBucket:
    Type: AWS::S3::Bucket
    Properties:
      BucketName: !Join
            - '-'
            - - !Ref LBAccessLogBucketName
              - !Ref AWS::AccountId
              - !Ref AWS::Region
      BucketEncryption:
        ServerSideEncryptionConfiguration:
          - ServerSideEncryptionByDefault:
              SSEAlgorithm: AES256
  LBAccessLogBucketPolicy:
    Type: AWS::S3::BucketPolicy
    Properties: 
      Bucket: !Ref LBAccessLogBucket
      PolicyDocument:
        Statement:
          - Action:
              - 's3:PutObject'
            Effect: Allow
            Resource: 
              - !Sub '${LBAccessLogBucket.Arn}/*'
            Principal: 
              AWS: !FindInMap [RegionELBAccountIdMap, !Ref 'AWS::Region', AccountId]
          - Action:
              - 's3:PutObject'
            Effect: Allow
            Resource: 
              - !Sub '${LBAccessLogBucket.Arn}/*'
            Principal: 
              Service: delivery.logs.amazonaws.com
          - Action:
              - 's3:GetBucketAcl'
            Effect: Allow
            Resource: 
              - !Sub ${LBAccessLogBucket.Arn}
            Principal: 
              Service: delivery.logs.amazonaws.com
  LogGroup:
    Type: AWS::Logs::LogGroup
    Properties:
      LogGroupName: /ecs/dcm4chee-arc-psql

  ArcService:
    Type: AWS::ECS::Service
    DependsOn:
    - ArcTCP8080Listener
    - ArcTCP8443Listener
    - ArcTCP11112Listener
    - LdapService
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



