question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

A way to create "linked" stacks

See original GitHub issue

I have a main stack that stores some essential information such as vpcId, loadBalancerArn, ecsClusterName etc in SSM Parameter Store. In other completely separate stacks, I would like to read these values from SSM and deploy new things on top of the VPC, ECS etc via those params, but I haven’t found a good way to do it.

Generally, if I try to use the fromAttributes functions of the different modules to get the resources the first stack created, I get very ridiculous requirements to be able to fetch a resource. For example, when I want to fetch a VPC with a VPC ID, I get asked to also provide subnets and AZs (logged bug here) and I see the same with pretty much all the other resources I have tried so far. If I try to use the fromLookup functions - that actually return a resource when provided its unique identifier - using values from SSM that are only resolved at deploy time, I get this error: All arguments to look up a load balancer must be concrete (no Tokens).

What’s the best approach to solve this issue? Or are we not meant to link stacks like this with CDK?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
peterwoodworthcommented, Feb 15, 2021

Hi @mimozell,

You can link stacks by passing props through the constructors of the stacks. Check out this link to get a good idea of how to accomplish this. Let me know if this answers your question or if you need any additional help with this!

0reactions
github-actions[bot]commented, Mar 29, 2021

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Implement a stack using singly linked list - GeeksforGeeks
push(): Insert a new element into the stack i.e just insert a new element at the beginning of the linked list. · pop():...
Read more >
Linked List Implementation of Stack in Data Structure - javatpoint
In linked list implementation of stack, the nodes are maintained non-contiguously in the memory. Each node contains a pointer to its immediate successor...
Read more >
Stack Implementation using a Linked List – C, Java, and Python
We can easily implement a stack through a linked list. In linked list implementation, a stack is a pointer to the “head” of...
Read more >
Stack Implementation Using Linked List - Simplilearn
We already knew that linked lists allocate memory dynamically. Stack implementation using linked-list, the nodes are maintained in non- ...
Read more >
9.9. Linked Stacks - OpenDSA
The linked stack implementation is quite simple. Elements are inserted and removed only from the head of the list. A header node is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found