Not out of the box. You can make specific resources safe from destroyed by setting the protect opt to true, but that's it.
little-cartoon-10569
04/14/2021, 8:13 AM
You could write a dynamic provider that adds the protect opt to every resource based on a stack export from another stack...
little-cartoon-10569
04/14/2021, 8:13 AM
That would require you to up your stack A before and after stack B.. but it would work (I think).
little-cartoon-10569
04/14/2021, 8:15 AM
Another option would be to wrap your stack-A Pulumi program in automation-api, which checks for stack B and prevents deletes. That would be much easier.
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.