https://pulumi.com logo
Title
l

lemon-salesclerk-6224

09/29/2022, 12:41 AM
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

little-cartoon-10569

09/29/2022, 12:47 AM
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

lemon-salesclerk-6224

09/29/2022, 2:21 PM
sorry i typed
refresh
and
deploy
but meant
preview
vs.
update
. isDryRun seems like it's the answer