https://pulumi.com logo
#python
Title
# python
f

fierce-market-67222

04/23/2020, 2:06 PM
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

bland-lamp-16797

04/23/2020, 2:13 PM
this is very good question... I hope someone will answer 😞
f

faint-table-42725

04/23/2020, 4:51 PM
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

sparse-state-34229

04/23/2020, 6:50 PM
oh wow, TIL
ComponentResource