aws / aws/aws-cdk-cli

(CLI): Deploy Stacks by Glob doesn't work with Stages

Open
#1,441 2 comments 0 reactions 0 assignees View on GitHub
bug effort/medium p2
Dominant language
TypeScript
Stars
105
Forks
122
Avg merge
1d 17h
Merged PRs (30d)
71

Description

### Describe the bug

When deploying from the CLI, I'd expect that `cdk deploy "beta*"` would deploy `beta/stackA`, `beta/stackB`, and `beta/X/stackC`. However, it seems the glob will not pass the `/` marker. `cdk deploy "beta/*"` works as expected.

### Expected Behavior

I would expect that any stacks matched by the glob would be deployed - this would be the happy path for deploying a whole Stage.

### Current Behavior

```
$ cdk deploy "beta*"

No stacks match the name(s) beta*
```

Given:
```
$ cdk list

toplevelA
toplevelB
beta/nested
```

### Reproduction Steps

POC for a related issue: https://github.com/haljarrett/cdk-stage-issue

Execute `cdk deploy "beta*"` and find that no stacks are matched.

### Possible Solution

Suspect that this is a related issue to the one I opened yesterday: https://github.com/aws/aws-cdk-cli/issues/1442, and maybe has to do with how stack names are matched in `cdk-toolkit.ts`.

### Additional Information/Context

_No response_

### CDK CLI Version

2.114.1 (build 02bbb1d)

### Framework Version

_No response_

### Node.js Version

v20.6.0

### OS

MacOS

### Language

TypeScript

### Language Version

_No response_

### Other information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.