Is there a way to determine what kind of operation...
# general
l
Is there a way to determine what kind of operation pulumi is doing when it's running your code? I have an
index.ts
file that pulumi is running but when I do a
pulumi up
I want to know whether the current run of the code is because of
pulumi refresh
or
pulumi deploy
for example
l
Your code isn't run during a refresh or destroy.
You can use pulumi.isDryRun() to determine if it's a preview or up.
☝️ 1
l
sorry i typed
refresh
and
deploy
but meant
preview
vs.
update
. isDryRun seems like it's the answer