[core] Same stack names in different accounts
See original GitHub issueI would like to deploy the same stack name to two different accounts
Use Case
It makes more sense to me than trying to make stack names unique org-wide. Also, I have stacks already deployed to multiple accounts that I would like to move into CDK.
Proposed Solution
I would be ok if the logical name of the stack is unique org wide and still generated separate template files, but the manifest file could define the stack name:
"my-cross-account-stack-dev": {
"type": "aws:cloudformation:stack",
"environment": "aws://dev-account-id/unknown-region",
"stackName": "my-cross-account-stack",
"properties": {
"templateFile": "my-cross-account-stack-dev.template.json"
},
Other
I read through this issue https://github.com/aws/aws-cdk/issues/3401 and this issue https://github.com/aws/aws-cdk/issues/3322 and ultimately that would be the goal. I would like to be able to seamlessly deploy across multiple accounts with the cli.
- 👋 I may be able to implement this feature request
- ⚠️ This feature might incur a breaking change
This is a 🚀 Feature Request
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
StackSets concepts - AWS CloudFormation
A stack set ensures consistent deployment of the same stack resources, with the same settings, to all specified target accounts within the Regions...
Read more >Intro to Pulumi: Stacks
The stack name must be unique within a project. Stack names may only contain alphanumeric characters, hyphens, underscores, or periods. $ pulumi stack...
Read more >CloudFormation — Boto3 Docs 1.26.36 documentation
CloudFormation creates and deletes all member resources of the stack ... The Amazon Resource Name (ARN) for the configuration, in this account and...
Read more >Multi-region Deployment with CloudFormation StackSets
From an administrator account, you can define a CloudFormation template and use it to provision stacks in multiple target accounts, across multiple AWS ......
Read more >Stack - SST docs
It automatically prefixes the stack names with the stage and app name ... they can be deployed to multiple regions in the same...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The CDK does support
stackName
as a stack property:I added looked up that feature flag and added it to my cdk.json and this does work now. Thank you for pointing me to it.