aws-cdk-github-actions icon indicating copy to clipboard operation
aws-cdk-github-actions copied to clipboard

Deploying multiple Stacks

Open cdalar opened this issue 4 years ago • 2 comments

I would like to deploy multiple Stacks. cdk deploy allows to you do that . like cdk deploy TestStack Test2Stack

so by removing the double quotes should fix it. Didn't tested though.

So when I put multiple stacks on input.cdk_stack, it should work.

cdalar avatar Jan 03 '22 13:01 cdalar

I think this would not work with asterisks cdk deploy 'production-*'. Right?

bogdannazarenko avatar Jul 12 '22 03:07 bogdannazarenko

I ran into the same problem, looked into the CDK internals and it uses minimatch under the hood as you can see here. With that, you can turn what you pass to the cdk_stack input into a glob expression.

For my case I had several stacks but I wanted to deploy only 2 (lets call them stackA and stackB). So my glob expression became @(stackA|stackB). This works exactly as I expect since the @ means Match exactly one item from the group.

@cdalar If this solves your issue, consider closing this PR.

**One other thing to notice is that your PR might break existing implementarions of people using the "*" glob expression.

danieldspx avatar Oct 12 '22 14:10 danieldspx