Hi, is there any way to run some pulumi code only ...
# aws
h
Hi, is there any way to run some pulumi code only when the event "destroy" is running? I would like to detect this "event" to run an extra code.
w
There isn’t anything implicit to tell your code it’s a destroy - in fact, your code doesn’t really run on destroy since Pulumi is pretty much just deleting the resources. If you need to manage the destroy, you can leverage the automation api sdk (https://www.pulumi.com/blog/tag/automation-api/) to orchestrate things.