templates/mongodb-existing-vpc.template.yaml [1:248]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AWSTemplateFormatVersion: '2010-09-09'
Description: Deploy MongoDB Replica Set on AWS (existing VPC). (qs-1qtlo6bf9)
Metadata:
  AWS::CloudFormation::Interface:
    ParameterGroups:
      - Label:
          default: Network Configuration
        Parameters:
          - VPC
          - PrimaryNodeSubnet
          - Secondary0NodeSubnet
          - Secondary1NodeSubnet
          - BastionSecurityGroupID
      - Label:
          default: Security Configuration
        Parameters:
          - KeyPairName
      - Label:
          default: MongoDB Database Configuration
        Parameters:
          - ClusterReplicaSetCount
          - Iops
          - MongoDBVersion
          - MongoDBAdminUsername
          - MongoDBAdminPassword
          - NodeInstanceType
          - ReplicaShardIndex
          - VolumeSize
          - VolumeType
      - Label:
          default: AWS Quick Start Configuration
        Parameters:
          - QSS3BucketName
          - QSS3KeyPrefix
          - QSS3BucketRegion
    ParameterLabels:
      BastionSecurityGroupID:
        default: Bastion Security Group ID
      ClusterReplicaSetCount:
        default: Cluster Replica Set Count
      Iops:
        default: Iops
      KeyPairName:
        default: Key Pair Name
      MongoDBAdminPassword:
        default: MongoDB Admin Password
      MongoDBAdminUsername:
        default: MongoDB Admin Username
      MongoDBVersion:
        default: MongoDB Version
      NodeInstanceType:
        default: Node Instance Type
      PrimaryNodeSubnet:
        default: Primary Node Subnet
      QSS3BucketName:
        default: Quick Start S3 Bucket Name
      QSS3KeyPrefix:
        default: Quick Start S3 Key Prefix
      QSS3BucketRegion:
        default: Quick Start S3 bucket region
      ReplicaShardIndex:
        default: Replica Shard Index
      Secondary0NodeSubnet:
        default: Secondary0 Node Subnet
      Secondary1NodeSubnet:
        default: Secondary1 Node Subnet
      VPC:
        default: VPC
      VolumeSize:
        default: Volume Size
      VolumeType:
        default: Volume Type
Parameters:
  BastionSecurityGroupID:
    Description: ID of the Bastion Security Group (e.g., sg-7f16e910)
    Type: AWS::EC2::SecurityGroup::Id
  ClusterReplicaSetCount:
    Description: Number of Replica Set Members. Choose 1 or 3
    Type: String
    Default: '3'
    AllowedValues:
      - '1'
      - '3'
  MongoDBVersion:
    Description: MongoDB version
    Type: String
    Default: '4.2'
    AllowedValues:
      - '4.2'
      - '4.0'
      - '3.6'
      - '3.4'
  MongoDBAdminUsername:
    Default: admin
    NoEcho: 'true'
    Description: MongoDB admin account username
    Type: String
    MinLength: '1'
    MaxLength: '16'
    AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
    ConstraintDescription: must begin with a letter and contain only alphanumeric
      characters.
  MongoDBAdminPassword:
    AllowedPattern: ([A-Za-z0-9_@-]{8,32})
    ConstraintDescription: 'Input your MongoDB database password, Min 8, Maximum of
      32 characters. . Allowed characters are: [A-Za-z0-9_@-]'
    Description: Enter your MongoDB Database Password, Min 8, maximum of 32 characters.
    NoEcho: 'true'
    Type: String
  ReplicaShardIndex:
    Description: Shard Index of this replica set
    Type: String
    Default: '0'
  QSS3BucketName:
    AllowedPattern: ^[0-9a-zA-Z]+([0-9a-zA-Z-]*[0-9a-zA-Z])*$
    Default: aws-quickstart
    Type: String
    ConstraintDescription: Quick Start bucket name can include numbers, lowercase
      letters, uppercase letters, and hyphens (-). It cannot start or end with a hyphen
      (-).
    Description: S3 bucket name for the Quick Start assets. Quick Start bucket name
      can include numbers, lowercase letters, uppercase letters, and hyphens (-).
      It cannot start or end with a hyphen (-).
  QSS3KeyPrefix:
    AllowedPattern: ^[0-9a-zA-Z-/]*$
    Default: quickstart-mongodb/
    Type: String
    ConstraintDescription: Quick Start key prefix can include numbers, lowercase letters,
      uppercase letters, hyphens (-), and forward slash (/).
    Description: S3 key prefix for the Quick Start assets. Quick Start key prefix
      can include numbers, lowercase letters, uppercase letters, hyphens (-), and
      forward slash (/). It cannot start or end with a hyphen (-).
  QSS3BucketRegion:
    Default: us-east-1
    Description: The AWS Region where the Quick Start S3 bucket (QSS3BucketName) is
      hosted. When using your own bucket, you must specify this value.
    Type: String
  KeyPairName:
    Type: AWS::EC2::KeyPair::KeyName
    Default: home
    Description: Name of an existing EC2 KeyPair. MongoDB instances will launch with
      this KeyPair.
  VolumeSize:
    Type: String
    Description: EBS Volume Size (data) to be attached to node in GBs
    Default: '400'
  VolumeType:
    Type: String
    Description: EBS Volume Type (data) to be attached to node in GBs [io1,gp2]
    Default: gp2
    AllowedValues:
      - gp2
      - io1
  Iops:
    Type: String
    Description: Iops of EBS volume when io1 type is chosen. Otherwise ignored
    Default: '100'
  NodeInstanceType:
    Description: Amazon EC2 instance type for the MongoDB nodes.
    Type: String
    Default: m5.large
    AllowedValues:
      - m5.large
      - m5.xlarge
      - m5.2xlarge
      - m5.4xlarge
      - m5.12xlarge
      - m5.24xlarge
      - r5.large
      - r5.xlarge
      - r5.2xlarge
      - r5.4xlarge
      - r5.8xlarge
      - r5.12xlarge
      - r5.16xlarge
      - r5.24xlarge
      - c5.large
      - c5.xlarge
      - c5.2xlarge
      - c5.4xlarge
      - c5.9xlarge
      - c5.18xlarge
      - x1.16xlarge
      - x1.32xlarge
      - r4.large
      - r4.xlarge
      - r4.2xlarge
      - r4.4xlarge
      - r4.8xlarge
      - r4.16xlarge
      - i3.large
      - i3.xlarge
      - i3.2xlarge
      - i3.4xlarge
      - i3.8xlarge
      - i3.16xlarge
      - x1e.32xlarge
      - x1e.16xlarge
      - x1e.8xlarge
      - x1e.4xlarge
      - x1e.2xlarge
      - x1e.xlarge
      - m3.medium
      - m3.large
      - m3.xlarge
      - m3.2xlarge
      - m4.large
      - m4.xlarge
      - m4.2xlarge
      - m4.4xlarge
      - m4.10xlarge
      - c3.large
      - c3.xlarge
      - c3.2xlarge
      - c3.4xlarge
      - c3.8xlarge
      - r3.large
      - r3.xlarge
      - r3.2xlarge
      - r3.4xlarge
      - r3.8xlarge
      - i2.xlarge
      - i2.2xlarge
      - i2.4xlarge
      - i2.8xlarge
      - t3.large
      - t3.xlarge
      - t3.2xlarge
  VPC:
    Type: AWS::EC2::VPC::Id
    Description: VPC-ID of your existing Virtual Private Cloud (VPC) where you want
      to depoy MongoDB cluster.
  PrimaryNodeSubnet:
    Type: AWS::EC2::Subnet::Id
    Description: Subnet-ID the existing subnet in your VPC where you want to deploy
      Primary node(s).
  Secondary0NodeSubnet:
    Type: AWS::EC2::Subnet::Id
    Description: Subnet-ID the existing subnet in your VPC where you want to deploy
      Secondary node(s).
  Secondary1NodeSubnet:
    Type: AWS::EC2::Subnet::Id
    Description: Subnet-ID the existing subnet in your VPC where you want to deploy
      Secondary node(s).
Conditions:
  CreateThreeReplicaSet: !Equals
    - !Ref 'ClusterReplicaSetCount'
    - '3'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



templates/mongodb.template.yaml [1:248]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AWSTemplateFormatVersion: '2010-09-09'
Description: Deploy MongoDB Replica Set on AWS (existing VPC). (qs-1qtlo6bf9)
Metadata:
  AWS::CloudFormation::Interface:
    ParameterGroups:
      - Label:
          default: Network Configuration
        Parameters:
          - VPC
          - PrimaryNodeSubnet
          - Secondary0NodeSubnet
          - Secondary1NodeSubnet
          - BastionSecurityGroupID
      - Label:
          default: Security Configuration
        Parameters:
          - KeyPairName
      - Label:
          default: MongoDB Database Configuration
        Parameters:
          - ClusterReplicaSetCount
          - Iops
          - MongoDBVersion
          - MongoDBAdminUsername
          - MongoDBAdminPassword
          - NodeInstanceType
          - ReplicaShardIndex
          - VolumeSize
          - VolumeType
      - Label:
          default: AWS Quick Start Configuration
        Parameters:
          - QSS3BucketName
          - QSS3KeyPrefix
          - QSS3BucketRegion
    ParameterLabels:
      BastionSecurityGroupID:
        default: Bastion Security Group ID
      ClusterReplicaSetCount:
        default: Cluster Replica Set Count
      Iops:
        default: Iops
      KeyPairName:
        default: Key Pair Name
      MongoDBAdminPassword:
        default: MongoDB Admin Password
      MongoDBAdminUsername:
        default: MongoDB Admin Username
      MongoDBVersion:
        default: MongoDB Version
      NodeInstanceType:
        default: Node Instance Type
      PrimaryNodeSubnet:
        default: Primary Node Subnet
      QSS3BucketName:
        default: Quick Start S3 Bucket Name
      QSS3KeyPrefix:
        default: Quick Start S3 Key Prefix
      QSS3BucketRegion:
        default: Quick Start S3 bucket region
      ReplicaShardIndex:
        default: Replica Shard Index
      Secondary0NodeSubnet:
        default: Secondary0 Node Subnet
      Secondary1NodeSubnet:
        default: Secondary1 Node Subnet
      VPC:
        default: VPC
      VolumeSize:
        default: Volume Size
      VolumeType:
        default: Volume Type
Parameters:
  BastionSecurityGroupID:
    Description: ID of the Bastion Security Group (e.g., sg-7f16e910)
    Type: AWS::EC2::SecurityGroup::Id
  ClusterReplicaSetCount:
    Description: Number of Replica Set Members. Choose 1 or 3
    Type: String
    Default: '3'
    AllowedValues:
      - '1'
      - '3'
  MongoDBVersion:
    Description: MongoDB version
    Type: String
    Default: '4.2'
    AllowedValues:
      - '4.2'
      - '4.0'
      - '3.6'
      - '3.4'
  MongoDBAdminUsername:
    Default: admin
    NoEcho: 'true'
    Description: MongoDB admin account username
    Type: String
    MinLength: '1'
    MaxLength: '16'
    AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
    ConstraintDescription: must begin with a letter and contain only alphanumeric
      characters.
  MongoDBAdminPassword:
    AllowedPattern: ([A-Za-z0-9_@-]{8,32})
    ConstraintDescription: 'Input your MongoDB database password, Min 8, Maximum of
      32 characters. . Allowed characters are: [A-Za-z0-9_@-]'
    Description: Enter your MongoDB Database Password, Min 8, maximum of 32 characters.
    NoEcho: 'true'
    Type: String
  ReplicaShardIndex:
    Description: Shard Index of this replica set
    Type: String
    Default: '0'
  QSS3BucketName:
    AllowedPattern: ^[0-9a-zA-Z]+([0-9a-zA-Z-]*[0-9a-zA-Z])*$
    Default: aws-quickstart
    Type: String
    ConstraintDescription: Quick Start bucket name can include numbers, lowercase
      letters, uppercase letters, and hyphens (-). It cannot start or end with a hyphen
      (-).
    Description: S3 bucket name for the Quick Start assets. Quick Start bucket name
      can include numbers, lowercase letters, uppercase letters, and hyphens (-).
      It cannot start or end with a hyphen (-).
  QSS3KeyPrefix:
    AllowedPattern: ^[0-9a-zA-Z-/]*$
    Default: quickstart-mongodb/
    Type: String
    ConstraintDescription: Quick Start key prefix can include numbers, lowercase letters,
      uppercase letters, hyphens (-), and forward slash (/).
    Description: S3 key prefix for the Quick Start assets. Quick Start key prefix
      can include numbers, lowercase letters, uppercase letters, hyphens (-), and
      forward slash (/). It cannot start or end with a hyphen (-).
  QSS3BucketRegion:
    Default: us-east-1
    Description: The AWS Region where the Quick Start S3 bucket (QSS3BucketName) is
      hosted. When using your own bucket, you must specify this value.
    Type: String
  KeyPairName:
    Type: AWS::EC2::KeyPair::KeyName
    Default: home
    Description: Name of an existing EC2 KeyPair. MongoDB instances will launch with
      this KeyPair.
  VolumeSize:
    Type: String
    Description: EBS Volume Size (data) to be attached to node in GBs
    Default: '400'
  VolumeType:
    Type: String
    Description: EBS Volume Type (data) to be attached to node in GBs [io1,gp2]
    Default: gp2
    AllowedValues:
      - gp2
      - io1
  Iops:
    Type: String
    Description: Iops of EBS volume when io1 type is chosen. Otherwise ignored
    Default: '100'
  NodeInstanceType:
    Description: Amazon EC2 instance type for the MongoDB nodes.
    Type: String
    Default: m5.large
    AllowedValues:
      - m5.large
      - m5.xlarge
      - m5.2xlarge
      - m5.4xlarge
      - m5.12xlarge
      - m5.24xlarge
      - r5.large
      - r5.xlarge
      - r5.2xlarge
      - r5.4xlarge
      - r5.8xlarge
      - r5.12xlarge
      - r5.16xlarge
      - r5.24xlarge
      - c5.large
      - c5.xlarge
      - c5.2xlarge
      - c5.4xlarge
      - c5.9xlarge
      - c5.18xlarge
      - x1.16xlarge
      - x1.32xlarge
      - r4.large
      - r4.xlarge
      - r4.2xlarge
      - r4.4xlarge
      - r4.8xlarge
      - r4.16xlarge
      - i3.large
      - i3.xlarge
      - i3.2xlarge
      - i3.4xlarge
      - i3.8xlarge
      - i3.16xlarge
      - x1e.32xlarge
      - x1e.16xlarge
      - x1e.8xlarge
      - x1e.4xlarge
      - x1e.2xlarge
      - x1e.xlarge
      - m3.medium
      - m3.large
      - m3.xlarge
      - m3.2xlarge
      - m4.large
      - m4.xlarge
      - m4.2xlarge
      - m4.4xlarge
      - m4.10xlarge
      - c3.large
      - c3.xlarge
      - c3.2xlarge
      - c3.4xlarge
      - c3.8xlarge
      - r3.large
      - r3.xlarge
      - r3.2xlarge
      - r3.4xlarge
      - r3.8xlarge
      - i2.xlarge
      - i2.2xlarge
      - i2.4xlarge
      - i2.8xlarge
      - t3.large
      - t3.xlarge
      - t3.2xlarge
  VPC:
    Type: AWS::EC2::VPC::Id
    Description: VPC-ID of your existing Virtual Private Cloud (VPC) where you want
      to depoy MongoDB cluster.
  PrimaryNodeSubnet:
    Type: AWS::EC2::Subnet::Id
    Description: Subnet-ID the existing subnet in your VPC where you want to deploy
      Primary node(s).
  Secondary0NodeSubnet:
    Type: AWS::EC2::Subnet::Id
    Description: Subnet-ID the existing subnet in your VPC where you want to deploy
      Secondary node(s).
  Secondary1NodeSubnet:
    Type: AWS::EC2::Subnet::Id
    Description: Subnet-ID the existing subnet in your VPC where you want to deploy
      Secondary node(s).
Conditions:
  CreateThreeReplicaSet: !Equals
    - !Ref 'ClusterReplicaSetCount'
    - '3'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



