templates/main-existing-vpc.template.yaml [167:322]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  DomainAdminPassword:
    AllowedPattern: (?=^.{6,255}$)((?=.*\d)(?=.*[A-Z])(?=.*[a-z])|(?=.*\d)(?=.*[^A-Za-z0-9])(?=.*[a-z])|(?=.*[^A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z])|(?=.*\d)(?=.*[A-Z])(?=.*[^A-Za-z0-9]))^.*
    Description: Password for the domain admin user. Must be at least 8 characters
      containing letters, numbers and symbols
    MaxLength: '32'
    MinLength: '8'
    NoEcho: 'true'
    Type: String
  DomainDNSName:
    AllowedPattern: '[a-zA-Z0-9\-]+\..+'
    Default: example.com
    Description: Fully qualified domain name (FQDN) of the forest root domain e.g.
      example.com
    MaxLength: '255'
    MinLength: '2'
    Type: String
  DomainNetBIOSName:
    AllowedPattern: '[a-zA-Z0-9\-]+'
    Default: EXAMPLE
    Description: NetBIOS name of the domain (up to 15 characters) for users of earlier
      versions of Windows e.g. EXAMPLE
    MaxLength: '15'
    MinLength: '1'
    Type: String
  ADEdition:
    AllowedValues:
      - Standard
      - Enterprise
    Default: Standard
    Description: The AWS Microsoft AD edition. Valid values include Standard and Enterprise.
    Type: String
  KeyPairName:
    Description: Public/private key pairs allow you to securely connect to your instance
      after it launches
    Type: AWS::EC2::KeyPair::KeyName
  QSS3BucketName:
    AllowedPattern: '^[0-9a-zA-Z]+([0-9a-zA-Z-]*[0-9a-zA-Z])*$'
    ConstraintDescription:
      The Quick Start bucket name can include numbers, lowercase
      letters, uppercase letters, and hyphens (-). It cannot start or end with a 
      hyphen (-).
    Default: aws-quickstart
    Description:
      Name of the S3 bucket for your copy of the Quick Start assets. 
      Keep the default name unless you are customizing the template. 
      Changing the name updates code references to point to a new Quick 
      Start location. This name can include numbers, lowercase letters, 
      uppercase letters, and hyphens, but do not start or end with a hyphen (-). 
      See https://aws-quickstart.github.io/option1.html.
    Type: String
  QSS3BucketRegion:
    Default: 'us-east-1'
    Description: 'AWS Region where the Quick Start S3 bucket (QSS3BucketName) is 
    hosted. Keep the default Region unless you are customizing the template. 
    Changing this Region updates code references to point to a new Quick Start location. 
    When using your own bucket, specify the Region. 
    See https://aws-quickstart.github.io/option1.html.'
    Type: String
  QSS3KeyPrefix:
    AllowedPattern: '^[0-9a-zA-Z-/]*$'
    ConstraintDescription:
      The Quick Start S3 key prefix can include numbers, lowercase letters,
      uppercase letters, hyphens (-), and forward slashes (/). The prefix should
      end with a forward slash (/).
    Default: quickstart-microsoft-hpc/
    Description:
      S3 key prefix that is used to simulate a directory for your copy of the 
      Quick Start assets. Keep the default prefix unless you are customizing 
      the template. Changing this prefix updates code references to point to 
      a new Quick Start location. This prefix can include numbers, lowercase 
      letters, uppercase letters, hyphens (-), and forward slashes (/). End with 
      a forward slash. See https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html 
      and https://aws-quickstart.github.io/option1.html.
    Type: String
  VPCCIDR:
    AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$
    ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28
    Default: 10.0.0.0/16
    Description: CIDR Block for the VPC
    Type: String
  HeadNodeInstanceType:
    AllowedValues:
      - c5.large
      - c5.xlarge
      - c5.2xlarge
      - t3.medium
    Default: c5.xlarge
    Description: Amazon EC2 instance type for GRID Server
    Type: String
  HeadNodeNetBIOSName:
    AllowedPattern: '[a-zA-Z0-9\-]+'
    Default: hpcbar
    Description: NetBIOS name of the GRID Server
    MaxLength: '15'
    MinLength: '1'
    Type: String
  # FileSystemName:
  #   AllowedPattern: '[a-zA-Z0-9\-]+'
  #   Default: hpcstorage
  #   Description: Please provide the name of the filesystem for Windows FSX Storage
  #   MaxLength: '15'
  #   MinLength: '1'
  #   Type: String
  # StorageCapacity:
  #   AllowedValues:
  #     - '40'
  #     - '50'
  #     - '60'
  #   Default: '40'
  #   Description: Provide the Storage capacity required for FSX shared storage
  #   Type: String
  # ThroughputCapacity:
  #   AllowedValues:
  #     - '8'
  #     - '16'
  #   Default: '8'
  #   Description: Provide the throughput capacity required for FSX shared storage
  #   Type: String
  WorkerInstanceType:
    AllowedValues:
      - c5d.large
      - c5d.xlarge
      - c5d.2xlarge
      - c5d.4xlarge
      - c5d.9xlarge
      - c5d.18xlarge
    Default: c5d.xlarge
    Description: Amazon EC2 instance type for Worker NOde
    Type: String
  ASGName:
    AllowedPattern: '[a-zA-Z0-9\-]+'
    Default: HPCASG
    Description: AutoScaling Group Name for Worker Node
    MaxLength: '15'
    MinLength: '1'
    Type: String
  HTCoreCount:
    Default: '2'
    Description: This depends on Instance Type. For example To disable HT for c5d.18xlarge,
      specify 32.
    Type: String
#  ThreadsPerCore:
#    AllowedValues:
#      - '1'
#    Default: '1'
#    Description: Setting this to 1 disables HYPERTHREADING
#    Type: String
Conditions:
  UsingDefaultBucket: !Equals [!Ref QSS3BucketName, 'aws-quickstart']
Resources:
  ADUserSecrets:
    Type: AWS::SecretsManager::Secret
    Properties:
      Name: !Sub 'ADUserSecrets-${AWS::StackName}'
      Description: AD Admin User
      SecretString: !Sub '{ "username" : "admin", "password" : "${DomainAdminPassword}" }'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



templates/main.template.yaml [155:310]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  DomainAdminPassword:
    AllowedPattern: (?=^.{6,255}$)((?=.*\d)(?=.*[A-Z])(?=.*[a-z])|(?=.*\d)(?=.*[^A-Za-z0-9])(?=.*[a-z])|(?=.*[^A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z])|(?=.*\d)(?=.*[A-Z])(?=.*[^A-Za-z0-9]))^.*
    Description: Password for the domain admin user. Must be at least 8 characters
      containing letters, numbers and symbols
    MaxLength: '32'
    MinLength: '8'
    NoEcho: 'true'
    Type: String
  DomainDNSName:
    AllowedPattern: '[a-zA-Z0-9\-]+\..+'
    Default: example.com
    Description: Fully qualified domain name (FQDN) of the forest root domain e.g.
      example.com
    MaxLength: '255'
    MinLength: '2'
    Type: String
  DomainNetBIOSName:
    AllowedPattern: '[a-zA-Z0-9\-]+'
    Default: EXAMPLE
    Description: NetBIOS name of the domain (up to 15 characters) for users of earlier
      versions of Windows e.g. EXAMPLE
    MaxLength: '15'
    MinLength: '1'
    Type: String
  ADEdition:
    AllowedValues:
      - Standard
      - Enterprise
    Default: Standard
    Description: The AWS Microsoft AD edition. Valid values include Standard and Enterprise.
    Type: String
  KeyPairName:
    Description: Public/private key pairs allow you to securely connect to your instance
      after it launches
    Type: AWS::EC2::KeyPair::KeyName
  QSS3BucketName:
    AllowedPattern: '^[0-9a-zA-Z]+([0-9a-zA-Z-]*[0-9a-zA-Z])*$'
    ConstraintDescription:
      The Quick Start bucket name can include numbers, lowercase
      letters, uppercase letters, and hyphens (-). It cannot start or end with a 
      hyphen (-).
    Default: aws-quickstart
    Description:
      Name of the S3 bucket for your copy of the Quick Start assets. 
      Keep the default name unless you are customizing the template. 
      Changing the name updates code references to point to a new Quick 
      Start location. This name can include numbers, lowercase letters, 
      uppercase letters, and hyphens, but do not start or end with a hyphen (-). 
      See https://aws-quickstart.github.io/option1.html.
    Type: String
  QSS3BucketRegion:
    Default: 'us-east-1'
    Description: 'AWS Region where the Quick Start S3 bucket (QSS3BucketName) is 
    hosted. Keep the default Region unless you are customizing the template. 
    Changing this Region updates code references to point to a new Quick Start location. 
    When using your own bucket, specify the Region. 
    See https://aws-quickstart.github.io/option1.html.'
    Type: String
  QSS3KeyPrefix:
    AllowedPattern: '^[0-9a-zA-Z-/]*$'
    ConstraintDescription:
      The Quick Start S3 key prefix can include numbers, lowercase letters,
      uppercase letters, hyphens (-), and forward slashes (/). The prefix should
      end with a forward slash (/).
    Default: quickstart-microsoft-hpc/
    Description:
      S3 key prefix that is used to simulate a directory for your copy of the 
      Quick Start assets. Keep the default prefix unless you are customizing 
      the template. Changing this prefix updates code references to point to 
      a new Quick Start location. This prefix can include numbers, lowercase 
      letters, uppercase letters, hyphens (-), and forward slashes (/). End with 
      a forward slash. See https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html 
      and https://aws-quickstart.github.io/option1.html.
    Type: String
  VPCCIDR:
    AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$
    ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28
    Default: 10.0.0.0/16
    Description: CIDR Block for the VPC
    Type: String
  HeadNodeInstanceType:
    AllowedValues:
      - c5.large
      - c5.xlarge
      - c5.2xlarge
      - t3.medium
    Default: c5.xlarge
    Description: Amazon EC2 instance type for GRID Server
    Type: String
  HeadNodeNetBIOSName:
    AllowedPattern: '[a-zA-Z0-9\-]+'
    Default: hpcbar
    Description: NetBIOS name of the GRID Server
    MaxLength: '15'
    MinLength: '1'
    Type: String
  # FileSystemName:
  #   AllowedPattern: '[a-zA-Z0-9\-]+'
  #   Default: hpcstorage
  #   Description: Please provide the name of the filesystem for Windows FSX Storage
  #   MaxLength: '15'
  #   MinLength: '1'
  #   Type: String
  # StorageCapacity:
  #   AllowedValues:
  #     - '40'
  #     - '50'
  #     - '60'
  #   Default: '40'
  #   Description: Provide the Storage capacity required for FSX shared storage
  #   Type: String
  # ThroughputCapacity:
  #   AllowedValues:
  #     - '8'
  #     - '16'
  #   Default: '8'
  #   Description: Provide the throughput capacity required for FSX shared storage
  #   Type: String
  WorkerInstanceType:
    AllowedValues:
      - c5d.large
      - c5d.xlarge
      - c5d.2xlarge
      - c5d.4xlarge
      - c5d.9xlarge
      - c5d.18xlarge
    Default: c5d.xlarge
    Description: Amazon EC2 instance type for Worker NOde
    Type: String
  ASGName:
    AllowedPattern: '[a-zA-Z0-9\-]+'
    Default: HPCASG
    Description: AutoScaling Group Name for Worker Node
    MaxLength: '15'
    MinLength: '1'
    Type: String
  HTCoreCount:
    Default: '2'
    Description: This depends on Instance Type. For example To disable HT for c5d.18xlarge,
      specify 32.
    Type: String
#  ThreadsPerCore:
#    AllowedValues:
#      - '1'
#    Default: '1'
#    Description: Setting this to 1 disables HYPERTHREADING
#    Type: String
Conditions:
  UsingDefaultBucket: !Equals [!Ref QSS3BucketName, 'aws-quickstart']
Resources:
  ADUserSecrets:
    Type: AWS::SecretsManager::Secret
    Properties:
      Name: !Sub 'ADUserSecrets-${AWS::StackName}'
      Description: AD Admin User
      SecretString: !Sub '{ "username" : "admin", "password" : "${DomainAdminPassword}" }'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



