Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(cli): introduce a new flag for CloudFormation's FORCE_DELETE_STACK #30344

Open
2 tasks
garysassano opened this issue May 26, 2024 · 5 comments
Open
2 tasks
Labels
cli Issues related to the CDK CLI effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 package/tools Related to AWS CDK Tools or CLI

Comments

@garysassano
Copy link

garysassano commented May 26, 2024

Describe the feature

It would be nice if we could introduce a new flag in the CDK CLI to take advantage of the new DeletionMode parameter with FORCE_DELETE_STACK value to make sure that the CloudFormation stack gets destroyed at all costs, bypassing any possible error that may be encountered.

Use Case

Make the experience of force destroying a stack less annoying.

Proposed Solution

No response

Other Information

No response

Acknowledgements

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

CDK version used

2.143.0

Environment details (OS name and version, etc.)

WSL2 Ubuntu 22.04.3 LTS

@garysassano garysassano added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels May 26, 2024
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label May 26, 2024
@par6n
Copy link

par6n commented May 27, 2024

It would be very nice to have CDK leverage this feature. Although, I'm not entirely sure if recycling --force flag would be convenient, since the CDK force and CloudFormation FORCE_DELETE_STACK have two different meanings. Perhaps something like:

cdk destroy --mode FORCE_DELETE_STACK

Which would allow for other modes, if the CF team adds any in the future.

@nmussy
Copy link
Contributor

nmussy commented May 27, 2024

I don't think we should update destroy --force to use this new mode, it would be an unexpected behavior for CDK users. The current flag only bypasses CLI confirmation.
I would definitely create a new flag, but a boolean --force-stack-deletion might be enough

@garysassano garysassano changed the title (cli): cdk destroy --force should use CloudFormation's FORCE_DELETE_STACK (cli): introduce a new flag for CloudFormation's FORCE_DELETE_STACK May 27, 2024
@garysassano
Copy link
Author

I agree that it could be problematic to change the behaviour of an existing flag, so I updated the PR.

@khushail khushail added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels May 28, 2024
@khushail
Copy link
Contributor

@garysassano , thanks for submitting this FR. I agree with @nmussy ,since we have CDK Destroy, this behavior might be unexpected. Would need core team's input here on the consideration.

@khushail khushail added @aws-cdk/core Related to core CDK functionality p2 effort/medium Medium work item – several days of effort and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels May 28, 2024
@pahud pahud added the cli Issues related to the CDK CLI label May 29, 2024
@comcalvi comcalvi removed the @aws-cdk/core Related to core CDK functionality label Aug 23, 2024
@comcalvi
Copy link
Contributor

comcalvi commented Aug 23, 2024

Definitely a new flag on cdk destroy, --force-stack-deletion is a good name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Issues related to the CDK CLI effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

No branches or pull requests

6 participants