-
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
cdk cli: isolate stack #26589
Comments
@tommydongaws , thanks for reaching out. It would be helpful if you could state your usecase why this particular change is requested. |
the issue is when you follow this guidance from AWS, the stacks are no longer isolated: if you create a resource in one stack and expose it, then modify it in another stack, the stacks are no longer isolated. The change from stack 2 is deployed when you deploy stack 1. This breaks the mental model of stacks being isolated. For example, if you create a lambda in one stack, then in another stack you create a dynamo table and grant access to the lambda, the lambda permissions from stack 2 are deployed with stack 1. This can create unexpected behavior if you were expecting the stacks to deploy in isolation. |
Why is stack isolation not default behavior in CDK? It seems to me that resource definitions from one stack should not exist in the CF template generated by a different stack. |
Duplicate of #6743 |
|
Describe the feature
Could there be a flag to just run 1 stack inside the app?
cdk synth <stacka>
Current Behavior:
running all the stacks and then return the template for stack A.
Requested behavior:
only run stack A and then return that template for stack A.
Cx workaround:
remove stack b from App
Use Case
If it is isolated then in cases where "stack b" modifies "stack a" the output for stack a would be different.
Additionally it would be faster.
Proposed Solution
No response
Other Information
No response
Acknowledgements
CDK version used
2.89.0
Environment details (OS name and version, etc.)
Windows
The text was updated successfully, but these errors were encountered: