https://pulumi.com logo
Title
f

fancy-jelly-61092

11/03/2020, 3:47 PM
Is it possible to use dynamic resources (i.e.
extends pulumi.dynamic.Resource
) in a nodejs inline program using the Automation API? I get an exception:
Error: Cannot find module '@pulumi/pulumi/cmd/dynamic-provider'
as well as
error: could not read plugin [C:\Users\barcl\.pulumi\bin\pulumi-resource-pulumi-nodejs.cmd] stdout: EOF
. The installation works perfectly well using the traditional CLI-driven method
l

lemon-agent-27707

11/03/2020, 4:07 PM
I wonder if you need to set the
workdir
like this: https://github.com/pulumi/halloumi/blob/main/nodejs/app/index.ts#L106 It might be a manifestation of this issue: https://github.com/pulumi/pulumi/issues/5578 I'll admit I haven't tried to use dynamic providers with automation api so there quite possibly could be a gap here. Please do file an issue (or update the one linked above) if that is the case
f

fancy-jelly-61092

11/04/2020, 10:56 AM
@lemon-agent-27707 I can confirm that setting workdir done the trick. It causes other issues with multiple stacks and configuration, I have updated the linked issue
👍 2
w

wet-soccer-72485

11/22/2020, 9:18 AM
This helped me as well. Thanks @lemon-agent-27707