https://pulumi.com logo
#dotnet
Title
# dotnet
f

fast-dinner-32080

03/11/2020, 9:29 PM
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

tall-librarian-49374

03/11/2020, 9:36 PM
I’ll be updating examples and template this week, sorry for lacking on this
f

fast-dinner-32080

03/11/2020, 9:41 PM
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

tall-librarian-49374

03/12/2020, 8:54 PM
It must be immutable
Output<ImmutableDictionary<string, string>>
f

fast-dinner-32080

03/12/2020, 9:14 PM
ah okay. I should have looked closer cause it said it right in the exception 😅