Hello, so i have a question i have 5 deployments (...
# python
f
Hello, so i have a question i have 5 deployments (each one has cluster ip, lb and so on) and i need to deploy them in a particular order, lets say A before B and B before C and so on… how can i do this using a singel stack …because in the end i dont want to sort and have 5 micro-stacks…just for 1 cluster …for now i use a singlen entrypoint file where i call them. Im not sure if i can use depends_on for this and also not sure how to implement it. Thank you for any help
1
b
this is very good question... I hope someone will answer 😞
f
you can definitely use
depends_on
for something like this
doing it in a single stack implies you’ll have a single program covering all 5 deployments, which is fine
one thing you could do is create a
ComponentResource
to represent each of those deployments
so assuming you have something like
class MyDeployment(ComponentResource)
, you could do something like:
Copy code
A = MyDeployment(...)
B = MyDeployment(..., { depends_on=[A] })
...
s
oh wow, TIL
ComponentResource