https://pulumi.com logo
#general
Title
# general
t

thankful-coat-47937

05/24/2022, 9:04 PM
how can i check if i'm running in preview mode. basically want to restrict the program to not run during previews/dry runs
l

little-cartoon-10569

05/24/2022, 9:27 PM
pulumi.isDryRun(), I think? Or maybe it's pulumi.Runtime.isDryRun()?
A good alternative to this is to ensure that Pulumi is running with a user / rule that has no write privileges. That's safer (since anyone can remove the isDryRun() check).
t

thankful-coat-47937

05/24/2022, 9:28 PM
found it
yep!
thanks
140 Views