This message was deleted.
s
This message was deleted.
b
in your pulumi code you can check for
IsDryRun
which tells you if it is
preview
. That is so you can omit work that should only run during an
up
. Both
refresh
and
destroy
don't actually execute your pulumi code so it isn't necessary to check for them
🙌 1
l
hmm but I do want to run some code on
destroy
for cleanup but I guess that should live elsewhere. Thanks for the tip though 👍
b
Np. Yea you'll have to do post-destroy work independently of your call to
pulumi destroy
. Because
pulumi destroy
just loads your providers and destroyed what is currently in your state, which is why it doesn't execute your pulumi code