https://pulumi.com logo
a

adventurous-night-54654

02/01/2019, 2:13 PM
Are there more complicated examples in node/ts of the dynamic provider being used somewhere? I seem to keep running into issues around how the code is captured/executed. Once I write my code in a way that passes serialization and preview, it will often error when applying because something wasn't captured during serialization (sometimes my variables, sometimes ts things like __awaiter). I'm curious why serializing the code is necessary for the dynamic provider to function? Wouldn't it always use the assets one has locally? I'll also make some issues and minimal repros for the serialization issues I've noticed sometime this weekend.
g

gentle-diamond-70147

02/01/2019, 3:18 PM
If you could share your repro code, that would be a big help.
a

adventurous-night-54654

02/01/2019, 3:28 PM
Will do, it's currently in a monorepo with a ton of closed items, will extract relevant bits and post when I have some time this evening
a

adamant-restaurant-73893

02/01/2019, 3:58 PM
Not sure if this helps, but there is a nice run through of creating a dynamic provider in this post https://blog.pulumi.com/managing-github-webhooks-with-pulumi
a

adventurous-night-54654

02/01/2019, 4:30 PM
Thanks for posting that, I had not seen it. It's a good example. I use dependencies that are just imported at the top and not lazily required by the provider's crud method, which may remove some of my blockers. Will have to try again later, thanks again!