aws-cli icon indicating copy to clipboard operation
aws-cli copied to clipboard

Add --rollback-configuration to cloudformation deploy

Open Xiphe opened this issue 2 years ago • 2 comments

Describe the feature

I think cloudformation deploy should have --rollback-configuration just like create-stack and update-stack.

(As @jaakkotuosa requested some time ago https://github.com/aws/aws-cli/issues/3712)

Use Case

I'd like to automate smoke tests after a deployment that would report on a AWS::CloudWatch::Alarm when some bug slipped though. Such an alarm would then rollback the deployment.

Afaik. this is currently possible using aws cloudformation update-stack --rollback-configuration. But aws cloudformation deploy is much more user-friendly and is commonly preferred over update-stack so the feature is not easily available to users of aws-sam, Architect, Serverless etc.

Proposed Solution

Provide the exact same functionality available on create-stack and update-stack to deploy

Other Information

No response

Acknowledgements

  • [ ] I may be able to implement this feature request
  • [ ] This feature might incur a breaking change

CLI version used

latest

Environment details (OS name and version, etc.)

any

Xiphe avatar Sep 08 '22 17:09 Xiphe

Hi @Xiphe thanks for reaching out. In that previous issue you referenced (https://github.com/aws/aws-cli/issues/3712) this comment provides more context as far as why it was closed: https://github.com/aws/aws-cli/issues/3712#issuecomment-936304880. The --disable-rollback was requested and added as a parameter option for aws cloudformation deploy in the PR mentioned there (https://github.com/aws/aws-cli/pull/6453). But we can consider this as a separate feature request for adding --rollback-configuration as it sounds like your use case would require that parameter.

Service teams own their customizations so I can reach out to the Cloudformation team and see if this is something they would consider adding, although I can't give any guarantees on if or when that would happen. But others are welcome to 👍 this issue to show their support or leave a comment if they have additional information to share such as other use cases.

tim-finnigan avatar Sep 08 '22 18:09 tim-finnigan

Yes, that sounds great! I'm aware that the older issue finally was resolved as --disable-rollback seems sufficient for the ppl involved.

But as mentioned I see a lot of value in both: the deploy command and the opportunity to programmatically declare additional rollback criteria. And would very much like to see this as an additional feature.

Highly appreciated when you could reach out to the cloud formation team.

Xiphe avatar Sep 08 '22 21:09 Xiphe