The BuildStep pulumi module doesn't run the cmd when --skip-preview is passed to pulumi.
Unfortunately pulumi doesn't expose whether --skip-preview has been used. I've check the process.env and process.argv as well to see if we can determine if --skip-preview is used, and we can't :(
I have 2 solutions in mind:
- Run the pulumi command with an env variable called
PULUMI_SKIP_PREVIEW and that could checked in our BuildStep component.
- Change the BuildStep into a
DynamicResourceProvider and always run the command in the diff method