Dear Pulumiers (er, new word?) - I'd like to run a...
# general
d
Dear Pulumiers (er, new word?) - I'd like to run a command on "destroy" only - to purge something from my cloud - is there a defined way that I can hook into the "post-delete" of a resource ?
Ok, so I think I want dynamic providers - they hook into the lifecycle. I'm using C# so where can I vote for the dynamic providers in this language? 🙂
b
I've been asking for that for a long time. The current implementation depends on it being in a weakly typed language, with the ability to serialize functions, so I think it is far off. My question for you is - can this action be taken at the end of your destroy? Does it have to happen in the middle?
d
at the end would be totally fine.
b
So you can do it at the end in your pipeline after executing pulumi destroy, or you can use Automation API and do it in code after executing pulumi destroy programmatically
With automation api you can subscribe to destroy events and you can make decisions based on specific resources getting destroyed.
Errrr I may be misremembering, you might only be able to subscribe to engine events on an UP invocation. But it's worth a look
d
wicked pointers - thank you!