@@ -335,7 +335,7 @@ const getStacks = async (account: AWSAccountInfo, region: string, regionsEnabled
335335 } while ( nextToken ) ;
336336
337337
338- console . log ( allStacks ) ;
338+ // console.log(allStacks);
339339 console . log ( "*****stack status filtering ****************" , region )
340340
341341 // We are interested in only the root stacks that are deployed by amplify-cli
@@ -819,7 +819,6 @@ const cleanupAccount = async (account: AWSAccountInfo, accountIndex: number, fil
819819
820820 const apps = ( await Promise . all ( appPromises ) ) . flat ( ) ;
821821 const stacks = ( await Promise . all ( stackPromises ) ) . flat ( ) ;
822- console . log ( stacks ) ;
823822 const buckets = await bucketPromise ;
824823 const orphanBuckets = await orphanBucketPromise ;
825824 const orphanIamRoles = await orphanIamRolesPromise ;
@@ -828,7 +827,7 @@ const cleanupAccount = async (account: AWSAccountInfo, accountIndex: number, fil
828827 const staleResources = _ . pickBy ( allResources , filterPredicate ) ;
829828
830829 generateReport ( staleResources , accountIndex ) ;
831- // await deleteResources(account, accountIndex, stacks);
830+ await deleteResources ( account , accountIndex , stacks ) ;
832831 console . log ( `${ generateAccountInfo ( account , accountIndex ) } Cleanup done!` ) ;
833832} ;
834833
@@ -868,14 +867,12 @@ const cleanup = async (): Promise<void> => {
868867
869868 console . log ( "filterPredicate: " , filterPredicate ) ;
870869 const accounts = await getAccountsToCleanup ( ) ;
871- // accounts.map((account, i) => {
872- // console.log(`${generateAccountInfo(account, i)} is under cleanup`);
873- // });
870+ accounts . map ( ( account , i ) => {
871+ console . log ( `${ generateAccountInfo ( account , i ) } is under cleanup` ) ;
872+ } ) ;
874873 await Promise . all ( accounts . map ( ( account , i ) => {
875- if ( account . accountId == "535823242378" ) {
876874 console . log ( `${ generateAccountInfo ( account , i ) } is under cleanup` ) ;
877875 cleanupAccount ( account , i , filterPredicate )
878- }
879876 } ) ) ;
880877 console . log ( 'Done cleaning all accounts!' ) ;
881878} ;
0 commit comments