sparse-intern-71089
03/05/2019, 4:26 PMbitter-island-28909
03/05/2019, 4:27 PM.apply function, but it executes every time I run pulumi, not just when I say “yes” to performing an update.white-balloon-205
pulumi.runtime.isDryRun to test whether a preview is being run and only run some code if it is not a preview (aka "dry run").
The richest way to do this is with Dynamic Providers, which let you define your own Create, Read, Update and Delete steps for some virtual "resource" in JavaScript. This is very flexible, but quite low level currently and not yet well documented (docs coming soon).
But right now, an .apply with isDryRun should generally work well in many cases.bitter-island-28909
03/05/2019, 4:42 PMbitter-island-28909
03/05/2019, 4:43 PM