https://pulumi.com logo
#typescript
Title
# typescript
w

worried-painting-67291

08/24/2020, 9:26 PM
It seems like such a common thing to do, that I was hoping that there was a standard template/function/whatever to instruct the stack to use (but don't own) a resource if it exists, otherwise create and own it.
h

hundreds-musician-51496

08/24/2020, 9:39 PM
That's pretty contrary to what pulumi wants you to do (which is why its hard). A stack owns a resource, meaning its responsible for creation & destruction, or it refers to an existing resource (in which case it does not create/destroy that resource).
Not arguing about your approach, just that pulumi is going to make that hard. Pulumi really wants you to manage all those shared resources in their own stack.