File tree Expand file tree Collapse file tree 1 file changed +20
-15
lines changed
reference-artifacts/Custom-Scripts/lza-upgrade/src Expand file tree Collapse file tree 1 file changed +20
-15
lines changed Original file line number Diff line number Diff line change @@ -666,22 +666,27 @@ export class ResourceMapping {
666666
667667 async getStackList ( cloudformation : CloudFormation , environment : Environment ) {
668668 const stacks : string [ ] = [ ] ;
669- const response = await cloudformation
670- . listStacks ( {
671- StackStatusFilter : [
672- 'CREATE_COMPLETE' ,
673- 'UPDATE_COMPLETE' ,
674- 'UPDATE_ROLLBACK_FAILED' ,
675- 'UPDATE_ROLLBACK_COMPLETE' ,
676- 'IMPORT_COMPLETE' ,
677- ] ,
678- } )
679- . promise ( ) ;
680- for ( const stackSummary of response . StackSummaries || [ ] ) {
681- if ( stackSummary . StackName . includes ( 'Phase' ) ) {
682- stacks . push ( stackSummary . StackName ) ;
669+ let nextToken : string | undefined ;
670+ do {
671+ const response = await cloudformation
672+ . listStacks ( {
673+ NextToken : nextToken ,
674+ StackStatusFilter : [
675+ 'CREATE_COMPLETE' ,
676+ 'UPDATE_COMPLETE' ,
677+ 'UPDATE_ROLLBACK_FAILED' ,
678+ 'UPDATE_ROLLBACK_COMPLETE' ,
679+ 'IMPORT_COMPLETE' ,
680+ ] ,
681+ } )
682+ . promise ( ) ;
683+ for ( const stackSummary of response . StackSummaries || [ ] ) {
684+ if ( stackSummary . StackName . includes ( 'Phase' ) ) {
685+ stacks . push ( stackSummary . StackName ) ;
686+ }
683687 }
684- }
688+ nextToken = response . NextToken ;
689+ } while ( nextToken ) ;
685690 return {
686691 stacks,
687692 environment,
You can’t perform that action at this time.
0 commit comments