little-market-63455
07/15/2021, 2:11 PMdestroy
. I am not using the automation API and wondering if there is a property somewhere that tells me what mode is the CLI running under like up
, destroy
, refresh
, preview
and so on. I check pulumi.runtime
but it doesn't seem to expose this. I am probably not doing it the correct way, maybe dynamic providers?bored-oyster-3147
07/15/2021, 2:33 PMIsDryRun
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 themlittle-market-63455
07/15/2021, 4:04 PMdestroy
for cleanup but I guess that should live elsewhere. Thanks for the tip though 👍bored-oyster-3147
07/15/2021, 4:06 PMpulumi 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