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
fix(toolkit): support multiple toolkit stacks in the same environment (#1427)
The `--toolkit-stack-name` option can be used to specify the name for
the toolkit stack. However, since the the toolkit stack outputs
had "Export"s, which must be unique within an environment, it was
impossible to deploy multiple toolkit stacks.
This change removes the "Export"s as they are actually not used or needed
and also adds an integration test to verify that multiple toolkit stacks
can be deployed into the same environment.
`toolkitStackName` can also be specified in `cdk.json` or `~/.cdk.json`.
Updated the toolkit documentation topic to describe this.
Fixes#1416
Copy file name to clipboardExpand all lines: packages/aws-cdk/bin/cdk.ts
+7-4
Original file line number
Diff line number
Diff line change
@@ -46,16 +46,15 @@ async function parseCommandLineArguments() {
46
46
.option('version-reporting',{type: 'boolean',desc: 'Include the "AWS::CDK::Metadata" resource in synthesized templates (enabled by default)',default: undefined})
47
47
.option('path-metadata',{type: 'boolean',desc: 'Include "aws:cdk:path" CloudFormation metadata for each resource (enabled by default)',default: true})
48
48
.option('role-arn',{type: 'string',alias: 'r',desc: 'ARN of Role to use when invoking CloudFormation',default: undefined})
49
+
.option('toolkit-stack-name',{type: 'string',desc: 'The name of the CDK toolkit stack'})
49
50
.command(['list','ls'],'Lists all stacks in the app',yargs=>yargs
50
51
.option('long',{type: 'boolean',default: false,alias: 'l',desc: 'display environment information for each stack'}))
51
52
.command(['synthesize [STACKS..]','synth [STACKS..]'],'Synthesizes and prints the CloudFormation template for this stack',yargs=>yargs
52
53
.option('interactive',{type: 'boolean',alias: 'i',desc: 'interactively watch and show template updates'})
53
54
.option('output',{type: 'string',alias: 'o',desc: 'write CloudFormation template for requested stacks to the given directory'}))
54
-
.command('bootstrap [ENVIRONMENTS..]','Deploys the CDK toolkit stack into an AWS environment',yargs=>yargs
55
-
.option('toolkit-stack-name',{type: 'string',desc: 'the name of the CDK toolkit stack'}))
55
+
.command('bootstrap [ENVIRONMENTS..]','Deploys the CDK toolkit stack into an AWS environment')
56
56
.command('deploy [STACKS..]','Deploys the stack(s) named STACKS into your AWS account',yargs=>yargs
57
-
.option('require-approval',{type: 'string',choices: [RequireApproval.Never,RequireApproval.AnyChange,RequireApproval.Broadening],desc: 'what security-sensitive changes need manual approval'})
58
-
.option('toolkit-stack-name',{type: 'string',desc: 'the name of the CDK toolkit stack'}))
57
+
.option('require-approval',{type: 'string',choices: [RequireApproval.Never,RequireApproval.AnyChange,RequireApproval.Broadening],desc: 'what security-sensitive changes need manual approval'}))
59
58
.command('destroy [STACKS..]','Destroy the stack(s) named STACKS',yargs=>yargs
60
59
.option('force',{type: 'boolean',alias: 'f',desc: 'Do not ask for confirmation before destroying the stacks'}))
61
60
.command('diff [STACK]','Compares the specified stack with the deployed stack or a local template file',yargs=>yargs
@@ -144,6 +143,10 @@ async function initCommandLine() {
Description: "The CDK Toolkit Stack. It cas created by `cdk bootstrap` and manages resources necessary for managing your Cloud Applications with AWS CDK.",
0 commit comments