templates/mongodb-existing-vpc.template.yaml [252:510]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  UsingDefaultBucket: !Equals
    - !Ref 'QSS3BucketName'
    - aws-quickstart
Resources:
  MongoDBServerAccessSecurityGroup:
    Type: AWS::EC2::SecurityGroup
    Properties:
      VpcId: !Ref 'VPC'
      GroupDescription: Instances with access to MongoDB servers
  MongoDBServerSecurityGroup:
    Type: AWS::EC2::SecurityGroup
    Properties:
      VpcId: !Ref 'VPC'
      GroupDescription: MongoDB server management and access ports
      SecurityGroupIngress:
        - IpProtocol: tcp
          FromPort: 22
          ToPort: 22
          SourceSecurityGroupId: !Ref 'BastionSecurityGroupID'
        - IpProtocol: tcp
          FromPort: 27017
          ToPort: 27030
          SourceSecurityGroupId: !Ref 'MongoDBServerAccessSecurityGroup'
        - IpProtocol: tcp
          FromPort: 28017
          ToPort: 28017
          SourceSecurityGroupId: !Ref 'MongoDBServerAccessSecurityGroup'
  MongoDBServersSecurityGroup:
    Type: AWS::EC2::SecurityGroup
    Properties:
      VpcId: !Ref 'VPC'
      GroupDescription: MongoDB inter-server communication and management ports
      SecurityGroupIngress:
        - IpProtocol: tcp
          FromPort: 22
          ToPort: 22
          SourceSecurityGroupId: !Ref 'MongoDBServerSecurityGroup'
        - IpProtocol: tcp
          FromPort: 27017
          ToPort: 27030
          SourceSecurityGroupId: !Ref 'MongoDBServerSecurityGroup'
        - IpProtocol: tcp
          FromPort: 28017
          ToPort: 28017
          SourceSecurityGroupId: !Ref 'MongoDBServerSecurityGroup'
  MongoDBNodeIAMRole:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Statement:
          - Effect: Allow
            Principal:
              Service:
                - ec2.amazonaws.com
            Action:
              - sts:AssumeRole
      Path: /
      Policies:
        - PolicyName: mongodb-quickstart-policy
          PolicyDocument:
            Statement:
              - Effect: Allow
                Action:
                  - ec2:Describe*
                  - ec2:AttachNetworkInterface
                  - ec2:AttachVolume
                  - ec2:CreateTags
                  - ec2:CreateVolume
                  - ec2:RunInstances
                  - ec2:StartInstances
                  - ec2:DeleteVolume
                  - ec2:CreateSecurityGroup
                  - ec2:CreateSnapshot
                Resource: '*'
              - Effect: Allow
                Action:
                  - s3:GetObject
                Resource: !Sub
                  - arn:${AWS::Partition}:s3:::${S3Bucket}/${QSS3KeyPrefix}*
                  - S3Bucket: !If
                      - UsingDefaultBucket
                      - !Sub '${QSS3BucketName}-${AWS::Region}'
                      - !Ref 'QSS3BucketName'
              - Effect: Allow
                Action:
                  - dynamodb:BatchGetItem
                  - dynamodb:CreateTable
                  - dynamodb:DeleteTable
                  - dynamodb:DescribeTable
                  - dynamodb:GetItem
                  - dynamodb:PutItem
                  - dynamodb:Query
                  - dynamodb:Scan
                  - dynamodb:UpdateItem
                  - dynamodb:UpdateTable
                Resource:
                  - !Sub 'arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/*MONGODB_*'
  MongoDBNodeIAMProfile:
    Type: AWS::IAM::InstanceProfile
    Properties:
      Path: /
      Roles:
        - !Ref 'MongoDBNodeIAMRole'
  PrimaryReplicaNode0WaitForNodeInstallWaitHandle:
    Type: AWS::CloudFormation::WaitConditionHandle
    Properties: {}
  PrimaryReplicaNode0:
    Type: AWS::CloudFormation::Stack
    Properties:
      TemplateURL: !Sub
        - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/mongodb-node.template.yaml
        - S3Region: !If
            - UsingDefaultBucket
            - !Ref 'AWS::Region'
            - !Ref 'QSS3BucketRegion'
          S3Bucket: !If
            - UsingDefaultBucket
            - !Sub '${QSS3BucketName}-${AWS::Region}'
            - !Ref 'QSS3BucketName'
      Parameters:
        QSS3BucketName: !Ref 'QSS3BucketName'
        QSS3KeyPrefix: !Ref 'QSS3KeyPrefix'
        QSS3BucketRegion: !Ref 'QSS3BucketRegion'
        ClusterReplicaSetCount: !Ref 'ClusterReplicaSetCount'
        Iops: !Ref 'Iops'
        KeyName: !Ref 'KeyPairName'
        MongoDBVersion: !Ref 'MongoDBVersion'
        MongoDBAdminUsername: !Ref 'MongoDBAdminUsername'
        MongoDBAdminPassword: !Ref 'MongoDBAdminPassword'
        NodeInstanceType: !Ref 'NodeInstanceType'
        NodeSubnet: !Ref 'PrimaryNodeSubnet'
        MongoDBServerSecurityGroupID: !Ref 'MongoDBServerSecurityGroup'
        MongoDBServersSecurityGroupID: !Ref 'MongoDBServersSecurityGroup'
        MongoDBNodeIAMProfileID: !Ref 'MongoDBNodeIAMProfile'
        VPC: !Ref 'VPC'
        VolumeSize: !Ref 'VolumeSize'
        VolumeType: !Ref 'VolumeType'
        StackName: !Ref 'AWS::StackName'
        ReplicaNodeNameTag: PrimaryReplicaNode0
        NodeReplicaSetIndex: '0'
        ReplicaShardIndex: !Ref 'ReplicaShardIndex'
        ReplicaNodeWaitForNodeInstallWaitHandle: !Ref 'PrimaryReplicaNode0WaitForNodeInstallWaitHandle'
  PrimaryReplicaNode0WaitForNodeInstall:
    Type: AWS::CloudFormation::WaitCondition
    DependsOn: PrimaryReplicaNode0
    Properties:
      Handle: !Ref 'PrimaryReplicaNode0WaitForNodeInstallWaitHandle'
      Timeout: '3600'
  SecondaryReplicaNode0WaitForNodeInstallWaitHandle:
    Type: AWS::CloudFormation::WaitConditionHandle
    Properties: {}
    Condition: CreateThreeReplicaSet
  SecondaryReplicaNode0:
    Condition: CreateThreeReplicaSet
    Type: AWS::CloudFormation::Stack
    Properties:
      TemplateURL: !Sub
        - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/mongodb-node.template.yaml
        - S3Region: !If
            - UsingDefaultBucket
            - !Ref 'AWS::Region'
            - !Ref 'QSS3BucketRegion'
          S3Bucket: !If
            - UsingDefaultBucket
            - !Sub '${QSS3BucketName}-${AWS::Region}'
            - !Ref 'QSS3BucketName'
      Parameters:
        QSS3BucketName: !Ref 'QSS3BucketName'
        QSS3KeyPrefix: !Ref 'QSS3KeyPrefix'
        QSS3BucketRegion: !Ref 'QSS3BucketRegion'
        ClusterReplicaSetCount: !Ref 'ClusterReplicaSetCount'
        Iops: !Ref 'Iops'
        KeyName: !Ref 'KeyPairName'
        MongoDBVersion: !Ref 'MongoDBVersion'
        MongoDBAdminUsername: !Ref 'MongoDBAdminUsername'
        MongoDBAdminPassword: !Ref 'MongoDBAdminPassword'
        NodeInstanceType: !Ref 'NodeInstanceType'
        NodeSubnet: !Ref 'Secondary0NodeSubnet'
        MongoDBServerSecurityGroupID: !Ref 'MongoDBServerSecurityGroup'
        MongoDBServersSecurityGroupID: !Ref 'MongoDBServersSecurityGroup'
        MongoDBNodeIAMProfileID: !Ref 'MongoDBNodeIAMProfile'
        VPC: !Ref 'VPC'
        VolumeSize: !Ref 'VolumeSize'
        VolumeType: !Ref 'VolumeType'
        StackName: !Ref 'AWS::StackName'
        ReplicaNodeNameTag: SecondaryReplicaNode0
        NodeReplicaSetIndex: '1'
        ReplicaShardIndex: !Ref 'ReplicaShardIndex'
        ReplicaNodeWaitForNodeInstallWaitHandle: !Ref 'SecondaryReplicaNode0WaitForNodeInstallWaitHandle'
  SecondaryReplicaNode0WaitForNodeInstall:
    Type: AWS::CloudFormation::WaitCondition
    Condition: CreateThreeReplicaSet
    DependsOn: SecondaryReplicaNode0
    Properties:
      Handle: !Ref 'SecondaryReplicaNode0WaitForNodeInstallWaitHandle'
      Timeout: '3600'
  SecondaryReplicaNode1WaitForNodeInstallWaitHandle:
    Type: AWS::CloudFormation::WaitConditionHandle
    Properties: {}
    Condition: CreateThreeReplicaSet
  SecondaryReplicaNode1:
    Condition: CreateThreeReplicaSet
    Type: AWS::CloudFormation::Stack
    Properties:
      TemplateURL: !Sub
        - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/mongodb-node.template.yaml
        - S3Region: !If
            - UsingDefaultBucket
            - !Ref 'AWS::Region'
            - !Ref 'QSS3BucketRegion'
          S3Bucket: !If
            - UsingDefaultBucket
            - !Sub '${QSS3BucketName}-${AWS::Region}'
            - !Ref 'QSS3BucketName'
      Parameters:
        QSS3BucketName: !Ref 'QSS3BucketName'
        QSS3KeyPrefix: !Ref 'QSS3KeyPrefix'
        QSS3BucketRegion: !Ref 'QSS3BucketRegion'
        ClusterReplicaSetCount: !Ref 'ClusterReplicaSetCount'
        Iops: !Ref 'Iops'
        KeyName: !Ref 'KeyPairName'
        MongoDBVersion: !Ref 'MongoDBVersion'
        MongoDBAdminUsername: !Ref 'MongoDBAdminUsername'
        MongoDBAdminPassword: !Ref 'MongoDBAdminPassword'
        NodeInstanceType: !Ref 'NodeInstanceType'
        NodeSubnet: !Ref 'Secondary1NodeSubnet'
        MongoDBServerSecurityGroupID: !Ref 'MongoDBServerSecurityGroup'
        MongoDBServersSecurityGroupID: !Ref 'MongoDBServersSecurityGroup'
        MongoDBNodeIAMProfileID: !Ref 'MongoDBNodeIAMProfile'
        VPC: !Ref 'VPC'
        VolumeSize: !Ref 'VolumeSize'
        VolumeType: !Ref 'VolumeType'
        StackName: !Ref 'AWS::StackName'
        ReplicaNodeNameTag: SecondaryReplicaNode1
        NodeReplicaSetIndex: '2'
        ReplicaShardIndex: !Ref 'ReplicaShardIndex'
        ReplicaNodeWaitForNodeInstallWaitHandle: !Ref 'SecondaryReplicaNode1WaitForNodeInstallWaitHandle'
  SecondaryReplicaNode1WaitForNodeInstall:
    Type: AWS::CloudFormation::WaitCondition
    Condition: CreateThreeReplicaSet
    DependsOn: SecondaryReplicaNode1
    Properties:
      Handle: !Ref 'SecondaryReplicaNode1WaitForNodeInstallWaitHandle'
      Timeout: '3600'
Outputs:
  PrimaryReplicaNodeIp:
    Value: !GetAtt 'PrimaryReplicaNode0.Outputs.NodePrivateIp'
    Description: Private IP Address of Primary Replica Node
  SecondaryReplicaNode0Ip:
    Value: !GetAtt 'SecondaryReplicaNode0.Outputs.NodePrivateIp'
    Description: Private IP Address of Secondary Replica 0 Node
    Condition: CreateThreeReplicaSet
  SecondaryReplicaNode1Ip:
    Value: !GetAtt 'SecondaryReplicaNode1.Outputs.NodePrivateIp'
    Description: Private IP Address of Secondary Replica 1 Node
    Condition: CreateThreeReplicaSet
  MongoDBServerAccessSecurityGroup:
    Value: !Ref 'MongoDBServerAccessSecurityGroup'
    Description: MongoDB Access Security Group
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



templates/mongodb.template.yaml [249:507]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  UsingDefaultBucket: !Equals
    - !Ref 'QSS3BucketName'
    - aws-quickstart
Resources:
  MongoDBServerAccessSecurityGroup:
    Type: AWS::EC2::SecurityGroup
    Properties:
      VpcId: !Ref 'VPC'
      GroupDescription: Instances with access to MongoDB servers
  MongoDBServerSecurityGroup:
    Type: AWS::EC2::SecurityGroup
    Properties:
      VpcId: !Ref 'VPC'
      GroupDescription: MongoDB server management and access ports
      SecurityGroupIngress:
        - IpProtocol: tcp
          FromPort: 22
          ToPort: 22
          SourceSecurityGroupId: !Ref 'BastionSecurityGroupID'
        - IpProtocol: tcp
          FromPort: 27017
          ToPort: 27030
          SourceSecurityGroupId: !Ref 'MongoDBServerAccessSecurityGroup'
        - IpProtocol: tcp
          FromPort: 28017
          ToPort: 28017
          SourceSecurityGroupId: !Ref 'MongoDBServerAccessSecurityGroup'
  MongoDBServersSecurityGroup:
    Type: AWS::EC2::SecurityGroup
    Properties:
      VpcId: !Ref 'VPC'
      GroupDescription: MongoDB inter-server communication and management ports
      SecurityGroupIngress:
        - IpProtocol: tcp
          FromPort: 22
          ToPort: 22
          SourceSecurityGroupId: !Ref 'MongoDBServerSecurityGroup'
        - IpProtocol: tcp
          FromPort: 27017
          ToPort: 27030
          SourceSecurityGroupId: !Ref 'MongoDBServerSecurityGroup'
        - IpProtocol: tcp
          FromPort: 28017
          ToPort: 28017
          SourceSecurityGroupId: !Ref 'MongoDBServerSecurityGroup'
  MongoDBNodeIAMRole:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Statement:
          - Effect: Allow
            Principal:
              Service:
                - ec2.amazonaws.com
            Action:
              - sts:AssumeRole
      Path: /
      Policies:
        - PolicyName: mongodb-quickstart-policy
          PolicyDocument:
            Statement:
              - Effect: Allow
                Action:
                  - ec2:Describe*
                  - ec2:AttachNetworkInterface
                  - ec2:AttachVolume
                  - ec2:CreateTags
                  - ec2:CreateVolume
                  - ec2:RunInstances
                  - ec2:StartInstances
                  - ec2:DeleteVolume
                  - ec2:CreateSecurityGroup
                  - ec2:CreateSnapshot
                Resource: '*'
              - Effect: Allow
                Action:
                  - s3:GetObject
                Resource: !Sub
                  - arn:${AWS::Partition}:s3:::${S3Bucket}/${QSS3KeyPrefix}*
                  - S3Bucket: !If
                      - UsingDefaultBucket
                      - !Sub '${QSS3BucketName}-${AWS::Region}'
                      - !Ref 'QSS3BucketName'
              - Effect: Allow
                Action:
                  - dynamodb:BatchGetItem
                  - dynamodb:CreateTable
                  - dynamodb:DeleteTable
                  - dynamodb:DescribeTable
                  - dynamodb:GetItem
                  - dynamodb:PutItem
                  - dynamodb:Query
                  - dynamodb:Scan
                  - dynamodb:UpdateItem
                  - dynamodb:UpdateTable
                Resource:
                  - !Sub 'arn:${AWS::Partition}:dynamodb:${AWS::Region}:${AWS::AccountId}:table/*MONGODB_*'
  MongoDBNodeIAMProfile:
    Type: AWS::IAM::InstanceProfile
    Properties:
      Path: /
      Roles:
        - !Ref 'MongoDBNodeIAMRole'
  PrimaryReplicaNode0WaitForNodeInstallWaitHandle:
    Type: AWS::CloudFormation::WaitConditionHandle
    Properties: {}
  PrimaryReplicaNode0:
    Type: AWS::CloudFormation::Stack
    Properties:
      TemplateURL: !Sub
        - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/mongodb-node.template.yaml
        - S3Region: !If
            - UsingDefaultBucket
            - !Ref 'AWS::Region'
            - !Ref 'QSS3BucketRegion'
          S3Bucket: !If
            - UsingDefaultBucket
            - !Sub '${QSS3BucketName}-${AWS::Region}'
            - !Ref 'QSS3BucketName'
      Parameters:
        QSS3BucketName: !Ref 'QSS3BucketName'
        QSS3KeyPrefix: !Ref 'QSS3KeyPrefix'
        QSS3BucketRegion: !Ref 'QSS3BucketRegion'
        ClusterReplicaSetCount: !Ref 'ClusterReplicaSetCount'
        Iops: !Ref 'Iops'
        KeyName: !Ref 'KeyPairName'
        MongoDBVersion: !Ref 'MongoDBVersion'
        MongoDBAdminUsername: !Ref 'MongoDBAdminUsername'
        MongoDBAdminPassword: !Ref 'MongoDBAdminPassword'
        NodeInstanceType: !Ref 'NodeInstanceType'
        NodeSubnet: !Ref 'PrimaryNodeSubnet'
        MongoDBServerSecurityGroupID: !Ref 'MongoDBServerSecurityGroup'
        MongoDBServersSecurityGroupID: !Ref 'MongoDBServersSecurityGroup'
        MongoDBNodeIAMProfileID: !Ref 'MongoDBNodeIAMProfile'
        VPC: !Ref 'VPC'
        VolumeSize: !Ref 'VolumeSize'
        VolumeType: !Ref 'VolumeType'
        StackName: !Ref 'AWS::StackName'
        ReplicaNodeNameTag: PrimaryReplicaNode0
        NodeReplicaSetIndex: '0'
        ReplicaShardIndex: !Ref 'ReplicaShardIndex'
        ReplicaNodeWaitForNodeInstallWaitHandle: !Ref 'PrimaryReplicaNode0WaitForNodeInstallWaitHandle'
  PrimaryReplicaNode0WaitForNodeInstall:
    Type: AWS::CloudFormation::WaitCondition
    DependsOn: PrimaryReplicaNode0
    Properties:
      Handle: !Ref 'PrimaryReplicaNode0WaitForNodeInstallWaitHandle'
      Timeout: '3600'
  SecondaryReplicaNode0WaitForNodeInstallWaitHandle:
    Type: AWS::CloudFormation::WaitConditionHandle
    Properties: {}
    Condition: CreateThreeReplicaSet
  SecondaryReplicaNode0:
    Condition: CreateThreeReplicaSet
    Type: AWS::CloudFormation::Stack
    Properties:
      TemplateURL: !Sub
        - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/mongodb-node.template.yaml
        - S3Region: !If
            - UsingDefaultBucket
            - !Ref 'AWS::Region'
            - !Ref 'QSS3BucketRegion'
          S3Bucket: !If
            - UsingDefaultBucket
            - !Sub '${QSS3BucketName}-${AWS::Region}'
            - !Ref 'QSS3BucketName'
      Parameters:
        QSS3BucketName: !Ref 'QSS3BucketName'
        QSS3KeyPrefix: !Ref 'QSS3KeyPrefix'
        QSS3BucketRegion: !Ref 'QSS3BucketRegion'
        ClusterReplicaSetCount: !Ref 'ClusterReplicaSetCount'
        Iops: !Ref 'Iops'
        KeyName: !Ref 'KeyPairName'
        MongoDBVersion: !Ref 'MongoDBVersion'
        MongoDBAdminUsername: !Ref 'MongoDBAdminUsername'
        MongoDBAdminPassword: !Ref 'MongoDBAdminPassword'
        NodeInstanceType: !Ref 'NodeInstanceType'
        NodeSubnet: !Ref 'Secondary0NodeSubnet'
        MongoDBServerSecurityGroupID: !Ref 'MongoDBServerSecurityGroup'
        MongoDBServersSecurityGroupID: !Ref 'MongoDBServersSecurityGroup'
        MongoDBNodeIAMProfileID: !Ref 'MongoDBNodeIAMProfile'
        VPC: !Ref 'VPC'
        VolumeSize: !Ref 'VolumeSize'
        VolumeType: !Ref 'VolumeType'
        StackName: !Ref 'AWS::StackName'
        ReplicaNodeNameTag: SecondaryReplicaNode0
        NodeReplicaSetIndex: '1'
        ReplicaShardIndex: !Ref 'ReplicaShardIndex'
        ReplicaNodeWaitForNodeInstallWaitHandle: !Ref 'SecondaryReplicaNode0WaitForNodeInstallWaitHandle'
  SecondaryReplicaNode0WaitForNodeInstall:
    Type: AWS::CloudFormation::WaitCondition
    Condition: CreateThreeReplicaSet
    DependsOn: SecondaryReplicaNode0
    Properties:
      Handle: !Ref 'SecondaryReplicaNode0WaitForNodeInstallWaitHandle'
      Timeout: '3600'
  SecondaryReplicaNode1WaitForNodeInstallWaitHandle:
    Type: AWS::CloudFormation::WaitConditionHandle
    Properties: {}
    Condition: CreateThreeReplicaSet
  SecondaryReplicaNode1:
    Condition: CreateThreeReplicaSet
    Type: AWS::CloudFormation::Stack
    Properties:
      TemplateURL: !Sub
        - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/mongodb-node.template.yaml
        - S3Region: !If
            - UsingDefaultBucket
            - !Ref 'AWS::Region'
            - !Ref 'QSS3BucketRegion'
          S3Bucket: !If
            - UsingDefaultBucket
            - !Sub '${QSS3BucketName}-${AWS::Region}'
            - !Ref 'QSS3BucketName'
      Parameters:
        QSS3BucketName: !Ref 'QSS3BucketName'
        QSS3KeyPrefix: !Ref 'QSS3KeyPrefix'
        QSS3BucketRegion: !Ref 'QSS3BucketRegion'
        ClusterReplicaSetCount: !Ref 'ClusterReplicaSetCount'
        Iops: !Ref 'Iops'
        KeyName: !Ref 'KeyPairName'
        MongoDBVersion: !Ref 'MongoDBVersion'
        MongoDBAdminUsername: !Ref 'MongoDBAdminUsername'
        MongoDBAdminPassword: !Ref 'MongoDBAdminPassword'
        NodeInstanceType: !Ref 'NodeInstanceType'
        NodeSubnet: !Ref 'Secondary1NodeSubnet'
        MongoDBServerSecurityGroupID: !Ref 'MongoDBServerSecurityGroup'
        MongoDBServersSecurityGroupID: !Ref 'MongoDBServersSecurityGroup'
        MongoDBNodeIAMProfileID: !Ref 'MongoDBNodeIAMProfile'
        VPC: !Ref 'VPC'
        VolumeSize: !Ref 'VolumeSize'
        VolumeType: !Ref 'VolumeType'
        StackName: !Ref 'AWS::StackName'
        ReplicaNodeNameTag: SecondaryReplicaNode1
        NodeReplicaSetIndex: '2'
        ReplicaShardIndex: !Ref 'ReplicaShardIndex'
        ReplicaNodeWaitForNodeInstallWaitHandle: !Ref 'SecondaryReplicaNode1WaitForNodeInstallWaitHandle'
  SecondaryReplicaNode1WaitForNodeInstall:
    Type: AWS::CloudFormation::WaitCondition
    Condition: CreateThreeReplicaSet
    DependsOn: SecondaryReplicaNode1
    Properties:
      Handle: !Ref 'SecondaryReplicaNode1WaitForNodeInstallWaitHandle'
      Timeout: '3600'
Outputs:
  PrimaryReplicaNodeIp:
    Value: !GetAtt 'PrimaryReplicaNode0.Outputs.NodePrivateIp'
    Description: Private IP Address of Primary Replica Node
  SecondaryReplicaNode0Ip:
    Value: !GetAtt 'SecondaryReplicaNode0.Outputs.NodePrivateIp'
    Description: Private IP Address of Secondary Replica 0 Node
    Condition: CreateThreeReplicaSet
  SecondaryReplicaNode1Ip:
    Value: !GetAtt 'SecondaryReplicaNode1.Outputs.NodePrivateIp'
    Description: Private IP Address of Secondary Replica 1 Node
    Condition: CreateThreeReplicaSet
  MongoDBServerAccessSecurityGroup:
    Value: !Ref 'MongoDBServerAccessSecurityGroup'
    Description: MongoDB Access Security Group
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



