This message was deleted.
# dotnet
s
This message was deleted.
t
As of today, you can’t use
object
in the types of stack outputs. So, you have to declare the subnets output as strings:
Copy code
[Output("private_subnets")]
    public Output<ImmutableArray<string>> PrivateSubnets { get; set; }
At the same time, you get an array of objects when you retrieve outputs from another stack, so you’d have to cast one to the other:
Copy code
this.PrivateSubnets = 
    vpcStack
        .RequireOutput("private_subnets")
        .Apply(o => 
            ((ImmutableArray<object>)o)
                .Select(o => (string)o)
                .ToImmutableArray());
I realize this is confusing. Please file an issue on github if you have ideas how to improve this flow that would make sense for your use case.
c
@bored-activity-40468 This works.
👍 1