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? 🙂
05/18/2022, 10:32 PM
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?
05/19/2022, 5:25 PM
at the end would be totally fine.
05/19/2022, 5:30 PM
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