Skip to content

toolkit: stacks can get stuck in ROLLBACK_COMPLETE #901

@rix0rrr

Description

@rix0rrr

If the first deploy of a stack fails, the stack gets stuck in ROLLBACK_COMPLETE and requires out-of-band user intervention to delete it and try again:

$ cdk -a 'node integ.autoscaling.js' deploy
 ⏳  Starting deployment of stack aws-cdk-dynamodb...
 ❌  Deployment of stack aws-cdk-dynamodb failed: ValidationError: Stack:arn:aws:cloudformation:us-east-1:993655754359:stack/aws-cdk-dynamodb/540d7d70-cd53-11e8-b11c-50d5cd265c36 is in ROLLBACK_COMPLETE state and can not be updated.
Stack:arn:aws:cloudformation:us-east-1:993655754359:stack/aws-cdk-dynamodb/540d7d70-cd53-11e8-b11c-50d5cd265c36 is in ROLLBACK_COMPLETE state and can not be updated.

This didn't use to happen because we created an empty stack and updated from there: rollback would update back to a safe point from which we could try to deploy again. But right now, you have to use the AWS CLI to delete the stack, wait for that, and only THEN can you try using the CDK again.

Pretty bad experience for first-time users who are almost guaranteed to get things wrong on the first try, and then get stuck in a position from which it's not obvious how to recover from.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions