From db0debc81adfbe73d10f91df63950e38634089cf Mon Sep 17 00:00:00 2001 From: Eamonn Faherty Date: Thu, 21 Oct 2021 14:03:59 +0100 Subject: [PATCH] feat: cloudformation.create_or_update now deleted changesets when there are no changes --- betterboto/cloudformation.py | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/betterboto/cloudformation.py b/betterboto/cloudformation.py index 9eacd2d..5f25733 100644 --- a/betterboto/cloudformation.py +++ b/betterboto/cloudformation.py @@ -108,6 +108,11 @@ def create_or_update(self, ShouldUseChangeSets=True, ShouldDeleteRollbackComplet raise e logger.info('Finished stack: {}'.format(stack_name)) else: + self.delete_change_set( + ChangeSetName=change_set_name, + StackName=stack_name + ) + logger.info('Deleted change set: {}'.format(change_set_name)) logger.info('No changes to build for stack: {}'.format(stack_name)) logger.info('Finished stack: {}'.format(stack_name)) else: diff --git a/setup.py b/setup.py index addabc7..abb4d9b 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setuptools.setup( name="better-boto", - version="0.42.0", + version="0.43.0", author="Eamonn Faherty", author_email="python-packages@designandsolve.co.uk", description="Helpers to make using boto3 more enjoyable",