templates/mf-fs-redhat-template.yaml [359:447]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        - Description: Fileshare client ingress
          IpProtocol: tcp
          FromPort: 3000
          ToPort: 3000
          SourceSecurityGroupId: !Ref FSClientAccessSGID
        - Description: >-
            Micro Focus Enterprise Server Directory Service (tcp) Listener
            ingress
          IpProtocol: tcp
          FromPort: 86
          ToPort: 86
          SourceSecurityGroupId: !Ref FSClientAccessSGID
        - Description: >-
            Micro Focus Enterprise Server Directory Service (udp) Listener
            ingress
          IpProtocol: udp
          FromPort: 86
          ToPort: 86
          SourceSecurityGroupId: !Ref FSClientAccessSGID
      VpcId: !Ref VPCID
  FSInstanceRole:
    Type: 'AWS::IAM::Role'
    Properties:
      AssumeRolePolicyDocument:
        Statement:
          - Action:
              - 'sts:AssumeRole'
            Effect: Allow
            Principal:
              Service:
                - ec2.amazonaws.com
      Path: /
      ManagedPolicyArns:
        - 'arn:aws:iam::aws:policy/service-role/AmazonEC2RoleforSSM'
        - 'arn:aws:iam::aws:policy/CloudWatchAgentServerPolicy'
      Policies:
        - PolicyDocument:
            Statement:
              - Action:
                  - 's3:GetObject'
                Effect: Allow
                Resource:
                  - !Sub
                    - arn:${AWS::Partition}:s3:::${S3Bucket}
                    - S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName]
                  - !Sub
                    - arn:${AWS::Partition}:s3:::${S3Bucket}/${QSS3KeyPrefix}*
                    - S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName]
            Version: 2012-10-17
          PolicyName: aws-quick-start-s3-policy
        - PolicyDocument:
            Statement:
              - Action:
                  - 's3:*'
                Effect: Allow
                Resource:
                  - !Sub 'arn:${AWS::Partition}:s3:::${ESS3BucketName}'
                  - !Sub 'arn:${AWS::Partition}:s3:::${ESS3BucketName}/*'
          PolicyName: FSInstancePolicy
  FSInstanceRoleProfile:
    Type: 'AWS::IAM::InstanceProfile'
    Properties:
      Path: /
      Roles:
        - !Ref FSInstanceRole
  FSPrimaryDataVolume:
    Type: 'AWS::EC2::Volume'
    Properties:
      VolumeType: gp2
      Size: !Ref FSStorageInGiB
      AvailabilityZone: !Select
        - 0
        - !Ref AvailabilityZones
      Tags:
        - Key: Name
          Value: !Sub
            - '${StackNamePrefix}${FSServerName} Data Volume'
            - StackNamePrefix: !If
                - NamePrefixIaUndefined
                - ''
                - !If
                  - NamePrefixIsAWSStackname
                  - !Sub '${AWS::StackName}-'
                  - !Sub '${ESResourceNamePrefix}-'
  FSPrimaryInstance:
    Type: 'AWS::EC2::Instance'
    CreationPolicy:
      ResourceSignal:
        Count: 1
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



templates/mf-fs-template.yaml [373:461]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        - Description: Fileshare client ingress
          IpProtocol: tcp
          FromPort: 3000
          ToPort: 3000
          SourceSecurityGroupId: !Ref FSClientAccessSGID
        - Description: >-
            Micro Focus Enterprise Server Directory Service (tcp) Listener
            ingress
          IpProtocol: tcp
          FromPort: 86
          ToPort: 86
          SourceSecurityGroupId: !Ref FSClientAccessSGID
        - Description: >-
            Micro Focus Enterprise Server Directory Service (udp) Listener
            ingress
          IpProtocol: udp
          FromPort: 86
          ToPort: 86
          SourceSecurityGroupId: !Ref FSClientAccessSGID
      VpcId: !Ref VPCID
  FSInstanceRole:
    Type: 'AWS::IAM::Role'
    Properties:
      AssumeRolePolicyDocument:
        Statement:
          - Action:
              - 'sts:AssumeRole'
            Effect: Allow
            Principal:
              Service:
                - ec2.amazonaws.com
      Path: /
      ManagedPolicyArns:
        - 'arn:aws:iam::aws:policy/service-role/AmazonEC2RoleforSSM'
        - 'arn:aws:iam::aws:policy/CloudWatchAgentServerPolicy'
      Policies:
        - PolicyDocument:
            Statement:
              - Action:
                  - 's3:GetObject'
                Effect: Allow
                Resource:
                  - !Sub
                    - arn:${AWS::Partition}:s3:::${S3Bucket}
                    - S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName]
                  - !Sub
                    - arn:${AWS::Partition}:s3:::${S3Bucket}/${QSS3KeyPrefix}*
                    - S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName]
            Version: 2012-10-17
          PolicyName: aws-quick-start-s3-policy
        - PolicyDocument:
            Statement:
              - Action:
                  - 's3:*'
                Effect: Allow
                Resource:
                  - !Sub 'arn:${AWS::Partition}:s3:::${ESS3BucketName}'
                  - !Sub 'arn:${AWS::Partition}:s3:::${ESS3BucketName}/*'
          PolicyName: FSInstancePolicy
  FSInstanceRoleProfile:
    Type: 'AWS::IAM::InstanceProfile'
    Properties:
      Path: /
      Roles:
        - !Ref FSInstanceRole
  FSPrimaryDataVolume:
    Type: 'AWS::EC2::Volume'
    Properties:
      VolumeType: gp2
      Size: !Ref FSStorageInGiB
      AvailabilityZone: !Select
        - 0
        - !Ref AvailabilityZones
      Tags:
        - Key: Name
          Value: !Sub
            - '${StackNamePrefix}${FSServerName} Data Volume'
            - StackNamePrefix: !If
                - NamePrefixIaUndefined
                - ''
                - !If
                  - NamePrefixIsAWSStackname
                  - !Sub '${AWS::StackName}-'
                  - !Sub '${ESResourceNamePrefix}-'
  FSPrimaryInstance:
    Type: 'AWS::EC2::Instance'
    CreationPolicy:
      ResourceSignal:
        Count: 1
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



