Skip to content

Commit

Permalink
delete empty changesets
Browse files Browse the repository at this point in the history
  • Loading branch information
snowiow committed Jun 12, 2024
1 parent 4a02f35 commit 1ce2cd4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cloudformation.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,15 @@ func (c *Cloudformation) CloudFormationDeploy(templateBody string, namedIAM bool
}

if changeSetIsEmpty(dcso) {
c.logger().Infof("ChangeSet '%v' is empty. Nothing to do.", *ccso.Id)
c.logger().Infof("ChangeSet '%v' is empty. Deleting again.", *ccso.Id)

_, err3 := c.CFClient.DeleteChangeSet(&cloudformation.DeleteChangeSetInput{
ChangeSetName: aws.String(csn),
StackName: aws.String(sn),

Check failure on line 217 in cloudformation.go

View workflow job for this annotation

GitHub Actions / test

File is not `gofmt`-ed with `-s` (gofmt)
})
if err3 != nil {
return fmt.Errorf("Couldn't delete empty change set: %w", err3)

Check failure on line 220 in cloudformation.go

View workflow job for this annotation

GitHub Actions / test

ST1005: error strings should not be capitalized (stylecheck)
}

return nil
}
Expand Down

0 comments on commit 1ce2cd4

Please sign in to comment.