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

quick-oil-16571

08/29/2022, 12:14 PM
Hi there - Using the automation API, is there any way to know my execution context(up, preview, destroy) within my Program? I am trying to limit when an Output.apply() is executed so that is will only be executed on
up
executions.
I am using a Python program. I am currently passing in an ENVVAR with the execution context and reading that in with the program, but that doesn’t feel very kosher.
b

billowy-army-68599

08/29/2022, 2:34 PM
There is a is_dry_run properly in the Pulumi sdk
q

quick-oil-16571

08/29/2022, 2:46 PM
And that is set based on if its a preview vs up/destroy im inferring?
b

billowy-army-68599

08/29/2022, 3:08 PM
yes that’s right
q

quick-oil-16571

08/29/2022, 3:32 PM
Wonderful news - thanks!
2 Views