dcm4chee/dcm4chee-arc-ec2-psql-keycloak.yml [868:949]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          Protocol: tcp
        - ContainerPort: 11112
          HostPort: 11112
          Protocol: tcp
      Cpu: !Ref ArchiveContainerCPU
      Memory: !Ref ArchiveContainerMemory
      ExecutionRoleArn:
        Ref: ArcTaskExecutionRole
      Family: dcm4chee-arc-psql-arc
      NetworkMode: awsvpc
      RequiresCompatibilities:
        - EC2
      TaskRoleArn: !Ref ArcTaskRole
      Volumes:
        - Name: storage
          EFSVolumeConfiguration:
            AuthorizationConfig:
              AccessPointId: !Ref StorageAccessPoint
              IAM: ENABLED
            FilesystemId: !Ref FileSystem
            TransitEncryption: ENABLED
  ArcTaskExecutionRole:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Statement:
        - Action:
          - sts:AssumeRole
          Condition: {}
          Effect: Allow
          Principal:
            Service: ecs-tasks.amazonaws.com
        Version: 2012-10-17
      ManagedPolicyArns:
      - arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy
      - arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly
      Tags:
      - Key: project
        Value: dcm4chee-arc-psql
      - Key: service
        Value: arc
  ArcTaskRole:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Statement:
        - Action:
          - sts:AssumeRole
          Condition: {}
          Effect: Allow
          Principal:
            Service: ecs-tasks.amazonaws.com
        Version: 2012-10-17
      Policies:
      - PolicyDocument:
          Statement:
          - Action:
            - elasticfilesystem:ClientMount
            - elasticfilesystem:ClientWrite
            - elasticfilesystem:ClientRootAccess
            Condition:
              StringEquals:
                elasticfilesystem:AccessPointArn:
                  Ref: StorageAccessPoint
            Effect: Allow
            Principal: {}
            Resource:
            - !GetAtt 'FileSystem.Arn'
          Version: 2012-10-17
        PolicyName: ArcStorageVolumeMountPolicy
      Tags:
      - Key: project
        Value: dcm4chee-arc-psql
      - Key: service
        Value: arc
  ECSAutoScalingGroup:
    Type: AWS::AutoScaling::AutoScalingGroup
    DependsOn:
      - StorageNFSMountTarget1
      - StorageNFSMountTarget2
    Properties:
      VPCZoneIdentifier:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



dcm4chee/dcm4chee-arc-ec2-psql.yml [746:827]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          Protocol: tcp
        - ContainerPort: 11112
          HostPort: 11112
          Protocol: tcp
      Cpu: !Ref ArchiveContainerCPU
      Memory: !Ref ArchiveContainerMemory
      ExecutionRoleArn:
        Ref: ArcTaskExecutionRole
      Family: dcm4chee-arc-psql-arc
      NetworkMode: awsvpc
      RequiresCompatibilities:
        - EC2
      TaskRoleArn: !Ref ArcTaskRole
      Volumes:
        - Name: storage
          EFSVolumeConfiguration:
            AuthorizationConfig:
              AccessPointId: !Ref StorageAccessPoint
              IAM: ENABLED
            FilesystemId: !Ref FileSystem
            TransitEncryption: ENABLED
  ArcTaskExecutionRole:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Statement:
        - Action:
          - sts:AssumeRole
          Condition: {}
          Effect: Allow
          Principal:
            Service: ecs-tasks.amazonaws.com
        Version: 2012-10-17
      ManagedPolicyArns:
      - arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy
      - arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly
      Tags:
      - Key: project
        Value: dcm4chee-arc-psql
      - Key: service
        Value: arc
  ArcTaskRole:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Statement:
        - Action:
          - sts:AssumeRole
          Condition: {}
          Effect: Allow
          Principal:
            Service: ecs-tasks.amazonaws.com
        Version: 2012-10-17
      Policies:
      - PolicyDocument:
          Statement:
          - Action:
            - elasticfilesystem:ClientMount
            - elasticfilesystem:ClientWrite
            - elasticfilesystem:ClientRootAccess
            Condition:
              StringEquals:
                elasticfilesystem:AccessPointArn:
                  Ref: StorageAccessPoint
            Effect: Allow
            Principal: {}
            Resource:
            - !GetAtt 'FileSystem.Arn'
          Version: 2012-10-17
        PolicyName: ArcStorageVolumeMountPolicy
      Tags:
      - Key: project
        Value: dcm4chee-arc-psql
      - Key: service
        Value: arc
  ECSAutoScalingGroup:
    Type: AWS::AutoScaling::AutoScalingGroup
    DependsOn:
      - StorageNFSMountTarget1
      - StorageNFSMountTarget2
    Properties:
      VPCZoneIdentifier:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



