-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
@aws-cdk/coreRelated to core CDK functionalityRelated to core CDK functionalityguidanceQuestion that needs advice or information.Question that needs advice or information.in-progressThis issue is being actively worked on.This issue is being actively worked on.
Description
I'm having multiple stacks with the same name in different accounts/regions. Consider following example code:
const app = new cdk.App()
new cdk.Stack(app, 'test1', { stackName: 'test', env: { account: 'XXXXXXXXXXXX', region: 'eu-west-1' } })
new cdk.Stack(app, 'test2', { stackName: 'test', env: { account: 'XXXXXXXXXXXX', region: 'us-east-1' } })-
cdk synthis creating only one template fortest2since it's the last one but the template is namedtest.test1gets overwritten. -
cdk listalso only lists the stacktestand it's not possible to see the corresponding env -
cdk deploycan only deploytest2ascdk deploy test
How is the stackName supposed to work? It looks like the stackName, when set, is treated as the main citizen here even though it's not unique.
Tested with cdk version 1.12.0
#4339 maybe something like visibleStackName makes more sense.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/coreRelated to core CDK functionalityRelated to core CDK functionalityguidanceQuestion that needs advice or information.Question that needs advice or information.in-progressThis issue is being actively worked on.This issue is being actively worked on.