pulumi / pulumi-dotnet

.NET support for Pulumi
Apache License 2.0
28 stars 25 forks source link

Fix provider to maintain internal instance state #105

Closed Frassle closed 1 year ago

Frassle commented 1 year ago

Reported on community slack.

Because the ResourceProviderService wasn't marked as a singleton in the aspnet layer it was being recreated fresh for each grpc request, each fresh creation was then freshly creating the users Provider object and so losing any instance state they had set on it.

This also fixed some NPEs in the marshaling layer in the case where Struct fields were null.