https://pulumi.com logo
#general
Title
# general
r

rhythmic-activity-46295

05/20/2021, 4:50 PM
Hello, Can someone help? I want to register a class as an OutputType. used the OutputType and Constructor attributes, but it doesn't seem to make any effect, and am still getting this exception on pulumi preview: System.InvalidOperationException: {ournamespace}..SubnetStackReference is not a supported argument type. monitor.registerResourceOutputs(...).AppServiceSubnetReferences.id.snet-dev-thin-product-catalogue at Pulumi.Serialization.Serializer.SerializeAsync(String ctx, Object prop, Boolean keepResources) at Pulumi.Serialization.Serializer.SerializeDictionaryAsync(String ctx, IDictionary dictionary, Boolean keepResources) at Pulumi.Serialization.Serializer.SerializeAsync(String ctx, Object prop, Boolean keepResources) at Pulumi.Serialization.Serializer.SerializeAsync(String ctx, Object prop, Boolean keepResources) at Pulumi.Deployment.SerializeFilteredPropertiesAsync(String label, IDictionary`2 args, Predicate`1 acceptKey, Boolean keepResources) at Pulumi.Deployment.SerializeAllPropertiesAsync(String label, IDictionary`2 args, Boolean keepResources) at Pulumi.Deployment.RegisterResourceOutputsAsync(Resource resource, Output`1 outputs) at Pulumi.Deployment.Runner.<>c__DisplayClass9_0.<<WhileRunningAsync>g__HandleCompletion|0>d.MoveNext() --- End of stack trace from previous location --- at Pulumi.Deployment.Runner.WhileRunningAsync() My output: [Output] public Output<ImmutableDictionary<string,SubnetStackReference>> SubnetReferences { get; set; } The class: [Pulumi.OutputTypeAttribute] public sealed class SubnetStackReference { private readonly string _id; private readonly string _name; private readonly SubnetKind _kind; [Pulumi.OutputConstructorAttribute] public SubnetStackReference(string id, string name, SubnetKind kind) { _id = id; _name = name; _kind = kind; } public string Id => _id; public string Name => _name; public SubnetKind Kind => _kind; } Any idea on what am I missing? not even sure I can do this in the first place in C# ...?!