Replies: 4 comments 4 replies
-
@skinny85 Would love to hear your thoughts. |
Beta Was this translation helpful? Give feedback.
-
@NetaNir @eladb you guys might also be interested. |
Beta Was this translation helpful? Give feedback.
-
Hey @corrjo , thanks for opening the discussion. Also adding @rix0rrr. This is something that we are aware of, and are planning to address, most likely using SSM Parameters, like you suggested (although I would guess our implementation would do all of that implicitly, without explicit As for the format, we usually use issues for this kind of discuss (example issue about this: #9672), but I'm willing to give GitHub Discussions a shot 🙂. Thanks, |
Beta Was this translation helpful? Give feedback.
-
A use-case I'd like to see solved is better handling of resources across stages, by using a well-known format/name/storage for accessing resources across this boundary. As an example, consider splitting a system in multiple stages or even multiple CDK applications, where a "central" part is responsible for a hosted zone. Another part might want to add a resource to this hosted zone, but it needs to be aware of its ID and zone name. One way to solve this is to use Building on the idea of It seems @rix0rrr have already discussed this type of solution: #1095 (comment) I think this could also be used to implement cross-region access to a construct or resource, by allow the There would still be limitations, such as the Vpc construct, that needs to know deploy-time specific information (such as the number/types of subnets in use). Some related issues: Some concerns:
|
Beta Was this translation helpful? Give feedback.
-
Looking for input:
Cloudformation exports work really well for consuming properties of long lived resources, like vpc or subnet ids, however when you have a cdk app with stacks and resources that have variable lifecycles, using exports can lead to a rough time with stacks or resources being locked because something is consuming its export leading to having to do something like https://www.endoflineblog.com/cdk-tips-03-how-to-unblock-cross-stack-references
How I handled this in CFN
Before using cdk, this was an issue that would pop up on occasion and this led me and my team to make broader use of nested stacks, and parameter store.
Nested stacks worked well enough, but it ended up requiring a lot of planning and overhead since passing values between nested stacks at the same level or more than 1 level deep becomes a bit convoluted, hence parameter store to the rescue.
Creating standardized parameter store paths for values based on the app or service we were deploying and consuming those cross stack using the native cloudformation parameter store parameter type gave us a lot of flexibility, allowed us to update resources as we needed and run the stack update on the consuming stacks to pick up new values
Cdk implementation
This is something I've started doing, and think it would make a great addition to aws-cdk. In aws-cdk it would probably be an addition to
cdk.Stack
to add methods for storing and retrieving values in parameter store, and probably look something like:which could then be stored and retrieved like:
the consuming stack ends up with a cloudformation parameter which will resolve on stack update:
Beta Was this translation helpful? Give feedback.
All reactions