Skip to content

Commit

Permalink
fix(list): Added support for 100+ stacks in list
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian committed Feb 20, 2020
1 parent 96e6529 commit 5133250
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
commitizen
1 change: 1 addition & 0 deletions tropoform/tropoform.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ def list_stacks(stack_name: str = None, region: str = None, profile: str = None,
else:
stack_description = ''
logger.info(f"{stack_name:{20}} {stack_status:{20}} {drift_status:{20}} {stack_description}")
# Support more than 100 stacks.. TODO: make this less lame
next_token = stacks['NextToken'] if 'NextToken' in stacks else None
while next_token:
stacks = cfn_client.describe_stacks(NextToken=next_token)
Expand Down

0 comments on commit 5133250

Please sign in to comment.