Skip to content

Commit

Permalink
Merge pull request #156 from adanaja/master
Browse files Browse the repository at this point in the history
Add a check that stack has been updated in CFNMain
  • Loading branch information
pierretr authored Dec 6, 2022
2 parents 55987b4 + 8f3609e commit eebd559
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/e3/aws/cfn/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,13 @@ def execute_for_stack(self, stack: Stack, aws_env: Optional[Session] = None) ->
changeset_name=changeset_name,
wait=self.args.wait_stack_creation,
)

if self.args.wait_stack_creation:
return (
0
if stack.state()["StackStatus"] == "UPDATE_COMPLETE"
else 1
)
return 0
else:
logging.info("Create new stack")
Expand Down

0 comments on commit eebd559

Please sign in to comment.