aws / aws/aws-cdk

(deploy): Support changing stack name at deploy time

Open
#38,525 4 comments 0 reactions 0 assignees View on GitHub
feature-request p2 package/tools
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the feature

Add an option to `cdk deploy` to specify the stack name.

### Use Case

It's not uncommon to want to have multiple similar configured stacks. Currently, CDK requires that you specify the stack name during the synth stage - but CloudFormation uses the stack name at deploy time.

It would be handy if you could override the synth'd stack name during `cdk deploy`.

### Proposed Solution

_No response_

### Other Information

`cdk synth` puts the stack name in the generated `manifest.json` file. You can edit that file without consequence, allowing a workaround.

### Acknowledgements

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

### AWS CDK Library version (aws-cdk-lib)

unknown

### AWS CDK CLI version

2.1135.1

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

Windows, not that it should matter.

Contributor guide

Open the contributing guide

Research direction

Start at the cdk deploy and cdk synth entry points and inspect how the generated manifest.json carries the stack name. Define the deploy-time override behavior and its effect on synthesized stacks, then add coverage showing that cdk deploy can use an alternate stack name. Done means the option works without requiring manual edits to manifest.json.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.