aws / aws/aws-cdk

core: be able to mark a stack as "absent"

Open
#27,444 10 comments 0 reactions 0 assignees View on GitHub
@aws-cdk/core effort/small feature-request p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the feature

We'd like to see a `state` property added to the `Stack` construct, allowing us to destroy stacks via code commits.

### Use Case

We manage thousands of CloudFormation stacks today with a tool we wrote named [Kingpin](https://kingpin.readthedocs.io/en/latest/). While the tool is long in the tooth and definitely not as good as CDK, it has a killer feature for us ... the ability to mark a stack as `present` or `absent`. When you manage thousands of stacks with IAC, it's pretty critical that you are able to both create, update, _and destroy_ stacks all via code commits.

I'd like to see the `Stack` construct get a `state` flag that allows us to define that the stack should be `absent`... that way we can programmatically delete stacks without asking administrators to go through dozens of accounts and regions to delete things.

### 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.100.0

### Environment details (OS name and version, etc.)

N/A

Contributor guide

Open the contributing guide

Research direction

Start with the CDK Stack construct and the deployment behavior for CloudFormation stacks. Trace how stack creation, updates, and deletion are currently represented, then define what an absent state would mean and how completion could be verified across accounts and regions.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.