-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for multiple instances of a cdk.App #1479
Closed
BDQ opened this issue
Jan 4, 2019
· 3 comments
· Fixed by #1940 · May be fixed by MechanicalRock/account-reaper#6
Closed
Support for multiple instances of a cdk.App #1479
BDQ opened this issue
Jan 4, 2019
· 3 comments
· Fixed by #1940 · May be fixed by MechanicalRock/account-reaper#6
Labels
@aws-cdk/core
Related to core CDK functionality
feature-request
A feature should be added or improved.
Comments
rix0rrr
added
@aws-cdk/core
Related to core CDK functionality
feature-request
A feature should be added or improved.
labels
Jan 4, 2019
As a design note, I think a higher-level
Should be sufficient to achieve this. Then that containing construct can be instantiated multiple times. |
As an additional note about something that I missed last time around: |
rix0rrr
added a commit
that referenced
this issue
Mar 4, 2019
Stacks no longer accept a `cdk.App` as scope, but a `cdk.Construct` like other constructs. This makes it possible define a Construct to represent your entire application, which can consist of a collection of Stacks. Stack names will automatically be derived from their location in the construct tree, but it's also possible to specify the deployed name of the stack by specifying the `stackName` property. Calling `app.run()` is no longer necessary, but can still safely be done. Fixes #1479.
4 tasks
rix0rrr
added a commit
that referenced
this issue
Mar 20, 2019
It is now possible for a Construct to contain Stacks. This allows modeling your application as a single Construct, and instantiating it multiple times for every environment. Stacks no longer accept a `cdk.App` as scope, but a `cdk.Construct` like other constructs. This makes it possible define a Construct to represent your entire application, which can consist of a collection of Stacks. Stack names will automatically be derived from their location in the construct tree, but it's also possible to specify the deployed name of the stack by specifying the `stackName` property. Calling `app.run()` is no longer necessary, but can still safely be done. Fixes #1479.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
@aws-cdk/core
Related to core CDK functionality
feature-request
A feature should be added or improved.
The current definition of an environment for CDK seems to be an Account Id + Region pair, but what about a use case where we might want multiple instances of a single App in the same account / region?
In our use case, we want to have many separate staging/qa instances of a (multi-stack) cdk.App - and in some cases each App instance may include slight tweaks to the underlying CDK code.
As a workaround for now, I'm injecting the local branch name into the stack names for each app instance, as follows:
It'd be great to have official support for environment / instance labels to allow multiple copies of the same app in the same account/region. Bonus points if it could leverage tags.
The text was updated successfully, but these errors were encountered: