You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(cli): deploy/destory require explicit stack selection if app contains more than a single stack (#2772)
To reduce risk to production systems, if an app includes more than a single
stack, "cdk deploy" and "cdk destroy" will fail and require that explicit
stack selector(s) will be specified.
Since wildcards are supported "cdk deploy '*'" will select all stacks.
Added support for stack selectors in "cdk ls"
Closes#2731
BREAKING CHANGE:
* **cli:** if an app includes more than one stack "cdk deploy" and "cdk destroy" now require that an explicit selector will be passed. Use "cdk deploy '*'" if you want to select all stacks.
@@ -45,7 +45,7 @@ async function parseCommandLineArguments() {
45
45
.option('toolkit-stack-name',{type: 'string',desc: 'The name of the CDK toolkit stack',requiresArg: true})
46
46
.option('staging',{type: 'boolean',desc: 'copy assets to the output directory (use --no-staging to disable, needed for local debugging the source files with SAM CLI)',default: true})
47
47
.option('output',{type: 'string',alias: 'o',desc: 'emits the synthesized cloud assembly into a directory (default: cdk.out)',requiresArg: true})
48
-
.command(['list','ls'],'Lists all stacks in the app',yargs=>yargs
48
+
.command(['list [STACKS..]','ls [STACKS..]'],'Lists all stacks in the app',yargs=>yargs
49
49
.option('long',{type: 'boolean',default: false,alias: 'l',desc: 'display environment information for each stack'}))
50
50
.command(['synthesize [STACKS..]','synth [STACKS..]'],'Synthesizes and prints the CloudFormation template for this stack',yargs=>yargs
51
51
.option('exclusively',{type: 'boolean',alias: 'e',desc: 'only deploy requested stacks, don\'t include dependencies'}))
@@ -173,7 +173,7 @@ async function initCommandLine() {
0 commit comments