Reputation: 21757
My env Typescript, node.js, cdk. I try to deploy AWS stack that consists of two stacks:
#!/usr/bin/env node
import 'source-map-support/register';
import * as cdk from "@aws-cdk/core";
import { WafRegionalStack } from '../lib/WafRegionalStack'
import { ReactStack } from '../lib/ReactStack';
const app = new cdk.App();
new WafRegionalStack(app, 'WafRegionalStack', {})
new ReactStack(app, 'ReactStack', {})
I use a command:
npx deploy
Doing this deployment process get a mistake
require argument if there is more than a single stack
Upvotes: 1
Views: 1916
Reputation: 2400
https://docs.aws.amazon.com/cdk/v2/guide/cli.html under Specify Stacks is how you can deploy specific or all stacks at once.
specifically
cdk deploy StackName
or with wildcards
cdk deploy Stack\*
in your specific situation, you can use:
cdk deploy WAF\* React\*
or
cdk deploy --all
Upvotes: 2
Reputation: 21757
If there is more than a single stack in the app we need to choose the CLI command:
npx cdk deploy '*'
Upvotes: 0