File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/deployments/runtime/src/ou-validation-events Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -197,12 +197,13 @@ export const handler = async (input: ScheduledEvent) => {
197197 const acceleratorAccountIds = accounts . map ( a => a . accountId ! ) ;
198198 const acceleratorTargetIds = [ ...rootIds , ...acceleratorOuIds , ...acceleratorAccountIds ] ;
199199 const acceleratorTargetOuIds = [ ...rootIds , ...acceleratorOuIds ] ;
200+ const baseline = globalOptionsConfig [ 'ct-baseline' ] ? 'CONTROL_TOWER' : 'ORGANIZATIONS' ;
200201
201202 // Detach non-Accelerator policies from Accelerator accounts
202203 await scps . detachPoliciesFromTargets ( {
203204 policyNamesToKeep : acceleratorPolicyNames ,
204205 policyTargetIdsToInclude : acceleratorTargetOuIds ,
205- baseline : globalOptionsConfig [ 'ct-baseline' ] ? 'CONTROL_TOWER' : 'ORGANIZATIONS' ,
206+ baseline,
206207 } ) ;
207208
208209 await scps . attachFullAwsAccessPolicyToTargets ( {
@@ -215,6 +216,7 @@ export const handler = async (input: ScheduledEvent) => {
215216 configurationOus : organizationalUnits ,
216217 acceleratorOus : config . getOrganizationalUnits ( ) ,
217218 acceleratorPrefix,
219+ baseline,
218220 } ) ;
219221
220222 await scps . attachOrDetachPoliciesToAccounts ( {
You can’t perform that action at this time.
0 commit comments