Skip to content

Commit b63ad54

Browse files
committed
Exit with an error on stack update roll back
1 parent 171e44f commit b63ad54

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ func run(ctx context.Context, stackName string, args []string) error {
132132
debugf("%s\t%s\t%v", aws.ToString(evt.ResourceType), aws.ToString(evt.LogicalResourceId), evt.ResourceStatus)
133133
if aws.ToString(evt.LogicalResourceId) == stackName && aws.ToString(evt.ResourceType) == "AWS::CloudFormation::Stack" {
134134
switch evt.ResourceStatus {
135+
case types.ResourceStatusUpdateRollbackComplete,
136+
types.ResourceStatusRollbackFailed:
137+
return fmt.Errorf("%v, see AWS CloudFormation Console for more details", evt.ResourceStatus)
135138
case types.ResourceStatusUpdateComplete:
136139
return nil
137140
}

0 commit comments

Comments
 (0)