08/05/2021, 4:39 PM
I have a network stack that is creating a vpc and a bunch of public subnets:
[Output] public Output<string> VpcId { get; set; }
[Output] public Output<ImmutableArray<string>> PublicSubnetIds { get; set; }
and am trying to reference these from another stack. I can reference the stack and can get the VpcId back using:
var network = new StackReference(SeparateNetworkStackName);
var vpcId = network.GetOutput("VpcId").Apply(x => x.ToString());
However, I can't work out how to retrieve the array of public subnets. These would seems like a fairly common operation. Anyone know how to do it?