@@ -6,6 +6,7 @@ Metadata:
66 - Label :
77 default : " AD Configuration"
88 Parameters :
9+ - CreateActiveDirectory
910 - DomainName
1011 - SubDomain
1112 - AdminPassword
@@ -21,10 +22,10 @@ Metadata:
2122
2223Parameters :
2324 DomainName :
24- Description : Active Directory Domain Name. The supplied LDIF file which provides bootstrap users uses this domain. A different LDIF file needs to be provided for a different domain.
25+ Description : (Optional) Active Directory Domain Name. The supplied LDIF file which provides bootstrap users uses this domain. A different LDIF file needs to be provided for a different domain.
2526 Type : String
2627 Default : corp.res.com
27- AllowedPattern : ^([a-zA-Z0-9]+[\\.-])+([a-zA-Z0-9])+$
28+ AllowedPattern : ^$|^ ([a-zA-Z0-9]+[\\.-])+([a-zA-Z0-9])+$
2829 SubDomain :
2930 Description : (Optional, but required for GovCloud regions) SubDomain for the Active Directory Domain Name. If provided, Active Directory Domain Name will be {SubDomain}.{DomainName}
3031 Type : String
@@ -37,21 +38,20 @@ Parameters:
3738 Description : (Optional) EnvironmentName must start with "res-"and should be less than or equal to 11 characters. Required to generate certificates.
3839 Type : String
3940 AllowedPattern : ^$|^res-[A-Za-z\-\_0-9]{0,7}$
40-
4141 Default : res-demo
4242 AdminPassword :
43- Description : Provide the Active Directory Administrator Account Password Directly or Resource ARN to Secret Containing Password.
43+ Description : (Optional) Provide the Active Directory Administrator Account Password Directly or Resource ARN to Secret Containing Password.
4444 Type : String
45- MinLength : 8
45+ MinLength : 0
4646 MaxLength : 2048
47- AllowedPattern : (arn:(aws(-cn|-us-gov)?):secretsmanager:(us(-gov)?|ap|ca|cn|eu|il|sa)-(central|(north|south)?(east|west)?)-\d:\d{12}:secret:[a-zA-Z0-9/_+=.@-]+)|(?=^.{8,64}$)((?=.*\d)(?=.*[A-Z])(?=.*[a-z])|(?=.*\d)(?=.*[^A-Za-z0-9\s])(?=.*[a-z])|(?=.*[^A-Za-z0-9\s])(?=.*[A-Z])(?=.*[a-z])|(?=.*\d)(?=.*[A-Z])(?=.*[^A-Za-z0-9\s]))^.*
47+ AllowedPattern : ^$| (arn:(aws(-cn|-us-gov)?):secretsmanager:(us(-gov)?|ap|ca|cn|eu|il|sa)-(central|(north|south)?(east|west)?)-\d:\d{12}:secret:[a-zA-Z0-9/_+=.@-]+)|(?=^.{8,64}$)((?=.*\d)(?=.*[A-Z])(?=.*[a-z])|(?=.*\d)(?=.*[^A-Za-z0-9\s])(?=.*[a-z])|(?=.*[^A-Za-z0-9\s])(?=.*[A-Z])(?=.*[a-z])|(?=.*\d)(?=.*[A-Z])(?=.*[^A-Za-z0-9\s]))^.*
4848 NoEcho : true
4949 ServiceAccountPassword :
50- Description : Provide the Active Directory Service Account Password Directly or Resource ARN to Secret Containing Password.
50+ Description : (Optional) Provide the Active Directory Service Account Password Directly or Resource ARN to Secret Containing Password.
5151 Type : String
52- MinLength : 8
52+ MinLength : 0
5353 MaxLength : 2048
54- AllowedPattern : (arn:(aws(-cn|-us-gov)?):secretsmanager:(us(-gov)?|ap|ca|cn|eu|il|sa)-(central|(north|south)?(east|west)?)-\d:\d{12}:secret:[a-zA-Z0-9/_+=.@-]+)|(?=^.{8,64}$)((?=.*\d)(?=.*[A-Z])(?=.*[a-z])|(?=.*\d)(?=.*[^A-Za-z0-9\s])(?=.*[a-z])|(?=.*[^A-Za-z0-9\s])(?=.*[A-Z])(?=.*[a-z])|(?=.*\d)(?=.*[A-Z])(?=.*[^A-Za-z0-9\s]))^.*
54+ AllowedPattern : ^$| (arn:(aws(-cn|-us-gov)?):secretsmanager:(us(-gov)?|ap|ca|cn|eu|il|sa)-(central|(north|south)?(east|west)?)-\d:\d{12}:secret:[a-zA-Z0-9/_+=.@-]+)|(?=^.{8,64}$)((?=.*\d)(?=.*[A-Z])(?=.*[a-z])|(?=.*\d)(?=.*[^A-Za-z0-9\s])(?=.*[a-z])|(?=.*[^A-Za-z0-9\s])(?=.*[A-Z])(?=.*[a-z])|(?=.*\d)(?=.*[A-Z])(?=.*[^A-Za-z0-9\s]))^.*
5555 NoEcho : true
5656 LDIFS3Path :
5757 Description : (Optional) An S3 Path (without the s3://) to an LDIF file that will be used during stack creation.
@@ -65,10 +65,12 @@ Parameters:
6565 - " True"
6666 - " False"
6767 Keypair :
68- Description : EC2 Keypair to access AD management instances.
69- Type : AWS::EC2::KeyPair::KeyName
68+ Description : (Optional) EC2 Keypair to access AD management instances.
69+ Type : String
70+ MinLength : 0
71+ MaxLength : 2048
7072 ClientIpCidr :
71- Description : CIDR controlling incoming traffic to AD management instances.
73+ Description : (Optional) CIDR controlling incoming traffic to AD management instances.
7274 Default : " "
7375 Type : String
7476 AllowedPattern : ^((\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/(\d{1,2}))?$
@@ -93,13 +95,21 @@ Parameters:
9395 AllowedValues :
9496 - " True"
9597 - " False"
98+ CreateActiveDirectory :
99+ Description : Create a demo Active Directory for RES to connect to. If `True` is selected, the following parameters are required DomainName, AdminPassword, ServiceAccountPassword, and Keypair.
100+ Type : String
101+ Default : " False"
102+ AllowedValues :
103+ - " True"
104+ - " False"
96105
97106Conditions :
98107 GenerateCerts : !Not [!Equals [!Ref PortalDomainName, ""]]
99108 UseEnvironmentName : !Not [!Equals [!Ref EnvironmentName, ""]]
100109 SubDomainNotProvided : !Equals [!Ref SubDomain, ""]
101110 InGovCloud : !Equals [!Ref 'AWS::Partition', "aws-us-gov"]
102111 RetainStorageAndNetworking : !Equals [!Ref RetainStorageResources, "True"]
112+ CreateAD : !Equals [!Ref CreateActiveDirectory, "True"]
103113
104114Resources :
105115
@@ -114,6 +124,7 @@ Resources:
114124 TemplateURL : https://aws-hpc-recipes.s3.us-east-1.amazonaws.com/main/recipes/net/hpc_large_scale/assets/main.yaml
115125
116126 DirectoryService :
127+ Condition : CreateAD
117128 Type : AWS::CloudFormation::Stack
118129 Properties :
119130 Parameters :
@@ -135,6 +146,7 @@ Resources:
135146 TemplateURL : https://aws-hpc-recipes.s3.us-east-1.amazonaws.com/main/recipes/dir/demo_managed_ad/assets/main.yaml
136147
137148 WindowsManagementHost :
149+ Condition : CreateAD
138150 Type : AWS::CloudFormation::Stack
139151 Properties :
140152 Parameters :
@@ -532,47 +544,59 @@ Outputs:
532544 Keypair :
533545 Description : Keypair used for management instances
534546 Value : !Ref Keypair
547+ Condition : CreateAD
535548 ActiveDirectoryName :
536549 Description : Fully Qualified Domain Name (FQDN) for your Active Directory
537550 Value : !If [ SubDomainNotProvided, !Ref DomainName, !Join [ ".", [ !Ref SubDomain, !Ref DomainName] ] ]
551+ Condition : CreateAD
538552 ADShortName :
539553 Description : Please provide the short name in Active directory
540554 Value : !GetAtt [ DirectoryService, Outputs.DomainShortName ]
555+ Condition : CreateAD
541556 LDAPConnectionURI :
542557 Value : !Sub
543558 - ldap://${DomainName}
544559 - { DomainName: !If [ SubDomainNotProvided, !Ref DomainName, !Join [ ".", [ !Ref SubDomain, !Ref DomainName] ] ] }
560+ Condition : CreateAD
545561 SudoersGroupName :
546562 Value : RESAdministrators
563+ Condition : CreateAD
547564 LDAPBase :
548565 Value : !Sub
549566 - dc=${dc}
550567 - { dc: !Join [",dc=", !Split [".", !If [ SubDomainNotProvided, !Ref DomainName, !Join [ ".", [ !Ref SubDomain, !Ref DomainName] ] ] ]] }
568+ Condition : CreateAD
551569 ServiceAccountCredentialsSecretArn :
552570 Value : !GetAtt [ DirectoryService, Outputs.CredentialsSecretArn ]
571+ Condition : CreateAD
553572 ServiceAccountUserDN :
554573 Description : The Distinguished Name (DN) of the ServiceAccount user in your Active Directory
555574 Value : !Sub
556575 - CN=ServiceAccount,OU=Users,OU=${ou},DC=${dc}
557576 - {dc: !Join [",DC=", !Split [".", !If [ SubDomainNotProvided, !Ref DomainName, !Join [ ".", [ !Ref SubDomain, !Ref DomainName]]]]], ou: !GetAtt [ DirectoryService, Outputs.DomainShortName ]}
577+ Condition : CreateAD
558578 SharedHomeFilesystemId :
559579 Value : !GetAtt [ Storage, Outputs.EFSFilesystemId ]
560580 UsersOU :
561581 Description : The OU for all users who might join the system. The value provided here is based off of a supplied LDIF file.
562582 Value : !Sub
563583 - OU=Users,OU=RES,OU=${ou},DC=${dc}
564584 - { dc: !Join [",DC=", !Split [".", !If [ SubDomainNotProvided, !Ref DomainName, !Join [ ".", [ !Ref SubDomain, !Ref DomainName]]]]], ou: !GetAtt [ DirectoryService, Outputs.DomainShortName ]}
585+ Condition : CreateAD
565586 GroupsOU :
566587 Description : The OU for groups that users belong to who might join the system. The value provided here is based off of a supplied LDIF file.
567588 Value : !Sub
568589 - OU=Users,OU=RES,OU=${ou},DC=${dc}
569590 - { dc: !Join [",DC=", !Split [".", !If [ SubDomainNotProvided, !Ref DomainName, !Join [ ".", [ !Ref SubDomain, !Ref DomainName]]]]], ou: !GetAtt [ DirectoryService, Outputs.DomainShortName ]}
591+ Condition : CreateAD
570592 ComputersOU :
571593 Description : The OU for computers that join the AD. The value provided here is based off of a supplied LDIF file.
572594 Value : !Sub
573595 - OU=Computers,OU=RES,OU=${ou},DC=${dc}
574596 - { dc: !Join [",DC=", !Split [".", !If [ SubDomainNotProvided, !Ref DomainName, !Join [ ".", [ !Ref SubDomain, !Ref DomainName]]]]], ou: !GetAtt [ DirectoryService, Outputs.DomainShortName ]}
597+ Condition : CreateAD
575598 ActiveDirectoryDNSIPs :
576599 Description : The DNS IPs of your Active Directory
577600 Value : !Join [ ",", [ !GetAtt [ DirectoryService, Outputs.DnsIpAddress1 ], !GetAtt [ DirectoryService, Outputs.DnsIpAddress2 ] ] ]
601+ Condition : CreateAD
578602
0 commit comments