to tell it to destroy the children of your targets as well. Can get messy if there are a lot of children but if it is a resource that has no dependents it shouldn't be bad
l
little-cartoon-10569
07/07/2021, 9:49 PM
A flag in code may be more appropriate. If the temporary resource is skipped (because it's in an if-statement or similar) then it will be destroyed the next time you
up
.
little-cartoon-10569
07/07/2021, 9:51 PM
If you destroy it without removing it from the code then you risk
1. having it magically reappear at some point in the future, when Pulumi noticies it's missing from state and provider, and
2. having your code mislead people reading your code, because it's describing something other than reality.
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.