Hey, I'd like to publish my own type as one of the...
# dotnet
m
Hey, I'd like to publish my own type as one of the stack outputs. The code below is the closest I could get. I've already tried with: • POCO • POCO with
OutputType
and parameterless constructor with
OutputConstructor
• POCO with
OutputType
and constructor with
OutputConstructor
with values assigned by it
Copy code
<PackageReference Include="Pulumi" Version="3.*" />
Copy code
pulumi version
v3.202.0
āœ… 1
Here's the
pulumi up
output
I can see that pulumi logo puts into the state properties backing fields instead of the properties
As a workaround I've simply serialized the object to JSON and put it into
Output<string>
but its later consumption is not too great.
c
pulumi doesn't support managed types for outputs, since they need to be serialized into the stack. Serializing to JSON (and then deserializing on the other end) is the way to go.
šŸ™ 1
😢 1
e
This is something I mean to look into at some point. We need support for this for custom provider implementations, and it will apply to stack outputs as well.
m
Can you tell how high is it on your backlog? meaning, when could we expect it
e
Nothing imminent, might get to it towards the end of the year.