11AWSTemplateFormatVersion : ' 2010-09-09'
2- Description : Deploys OpenComply Platform to AWS Organization
2+ Description : Deploys OpenComply Platform to AWS Organization, targeting only Organizational Units (OUs)
33
44Parameters :
55 IAMUsernameInOrganizationAccount :
@@ -12,29 +12,22 @@ Parameters:
1212 Default : OpenComplyReadOnly
1313 Description : The name of the role that will be assumed in each member account.
1414
15- AccountList :
16- Type : String
17- Default : " "
18- Description : Comma-separated list of 12-digit AWS Account IDs to deploy the stackset to.
19- AllowedPattern : ' ^[0-9]{12}(,[0-9]{12})*$'
20- ConstraintDescription : Must be a comma-separated list of exactly 12-digit AWS Account IDs without spaces.
21-
2215 OrganizationUnitList :
23- Type : String
24- Default : " "
25- Description : Comma-separated list of Organizational Unit (OU) IDs to deploy the stackset to.
16+ Type : CommaDelimitedList
17+ Description : >
18+ List of Organizational Unit (OU) IDs to deploy the stackset to.
19+ Enter each OU ID without spaces.
2620
2721Conditions :
28- OUs : !Not [ !Equals [ !Ref OrganizationUnitList, '' ] ]
29- Accounts : !Not [ !Equals [ !Ref AccountList, '' ] ]
22+ HasOUs : !Not [ !Equals [ !Join ["", !Ref OrganizationUnitList ], "" ] ]
3023
3124Resources :
3225 # IAM Role in the Management Account
3326 OrganizationRole :
3427 Type : ' AWS::IAM::Role'
3528 Properties :
3629 RoleName : !Ref RoleNameInAccount
37- Description : Allows the platform to gather inventory of the organization and member accounts
30+ Description : Allows the OpenComply platform to gather inventory of the organization and member accounts
3831 AssumeRolePolicyDocument :
3932 Version : 2012-10-17
4033 Statement :
@@ -98,12 +91,12 @@ Resources:
9891 - ' sts:AssumeRole'
9992 Resource : !Sub 'arn:aws:iam::*:role/${RoleNameInAccount}'
10093
101- # StackSet to Deploy Roles to Member Accounts
94+ # StackSet to Deploy Roles to Member Accounts (Organizational Units Only)
10295 MemberAccountRoleStackSet :
10396 Type : ' AWS::CloudFormation::StackSet'
10497 Properties :
10598 StackSetName : OpenComplyMemberAccountRollout
106- Description : Stack Set that will roll out to member accounts
99+ Description : Stack Set that will roll out to member accounts within specified Organizational Units
107100 Capabilities :
108101 - CAPABILITY_NAMED_IAM
109102 AutoDeployment :
@@ -116,14 +109,7 @@ Resources:
116109 FailureTolerancePercentage : 100
117110 StackInstancesGroup :
118111 - DeploymentTargets :
119- Accounts : !If
120- - Accounts
121- - !Split [ ",", !Ref AccountList ]
122- - !Ref AWS::NoValue
123- OrganizationalUnitIds : !If
124- - OUs
125- - !Split [ ",", !Ref OrganizationUnitList ]
126- - !Ref AWS::NoValue
112+ OrganizationalUnitIds : !Ref OrganizationUnitList
127113 Regions :
128114 - !Ref AWS::Region
129115 ManagedExecution :
0 commit comments