How do I create an output for a class that is inhe...
# dotnet
f
How do I create an output for a class that is inheriting Stack. You used to just run it all in a single Deployment.Run which would return a dictionary but now that is is a separate class (from the template generator) and not sure how to return outputs. The documents still have the older way.
I tried creating an Output field for the class and calling RegisterOutputs but that causes pulumi to panic.
t
I’ll be updating examples and template this week, sorry for lacking on this
f
Ah cool, that did the trick. Thanks for the quick reply!
Is it possible to make a dictionary an output?
Copy code
[Output]
public Output<Dictionary<string, string>> VmInformation { get; private set; }= null!;
I have a dynamic amount of VMs and want to return the IPs
when I run it with that I get a panic
well a .net exception
t
It must be immutable
Output<ImmutableDictionary<string, string>>
f
ah okay. I should have looked closer cause it said it right in the exception 😅