cdk deploy should support querying stacks by stackName and not just by artifact IDs
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
I set stackName to HarvestStack, but when I do cdk deploy HarvestStack, it fails


### Reproduction Steps
I am using a nested stack
```
const networkingStack = new NetworkingStack(app, 'NetworkingStack', {
env: {
region: process.env.CDK_DEFAULT_REGION,
account: settingsForEnv.accountId
},
environmentName,
...settingsForEnv
})
const harvestStack = new HarvestStack(networkingStack, 'HarvestStack', {
stackName: 'HarvestStack',
env: {
region: process.env.CDK_DEFAULT_REGION,
account: settingsForEnv.accountId
},
environmentName,
...settingsForEnv,
vpc: networkingStack.vpc,
certificate: networkingStack.certificate,
hostedZone: networkingStack.hostedZone,
alarmSNSTopic: networkingStack.alarmSNSTopic
})
```
### Error Log
### Environment
- **CLI Version :** 1.44.0 (build 1cd832b)
- **Framework Version:** 1.44.0 (build 1cd832b)
- **Node.js Version:** v12.6
- **OS :** MacOS
- **Language (Version):** Typescript
### Other
---
This is :bug: Bug Report
Contributor guide
Research direction
Reproduce the nested-stack case by running `cdk deploy HarvestStack` with the example configuration, then trace the CLI's stack-selection path to see where artifact IDs are matched. Done means `cdk deploy` accepts the configured `stackName` as well as an artifact ID and preserves existing deployment behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cli, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100