prehistoric-london-9917
07/12/2021, 11:45 PMexport const privateSubnetIds = vpc.privateSubnetIds;
I have another stack that reads the first stack’s outputs:
const privateSubnetIds = vpcStack.requireOutput("privateSubnetIds");
The requireOutput
function returns an Output<any>
type.
What’s the proper way to cast this back to something like a string[]
?
I searched Slack and found someone else who asked a similar question, but it remained unanswered.
Any thoughts?const privateSubnetIds = vpcStack.requireOutput("privateSubnetIds") as unknown as string[];
but that seems kind of hacky..helpful-tent-95136
07/13/2021, 5:17 AMconst privateSubnetIds = vpcStack.requireOutput<string[]>("privateSubnetIds")
(Sorry haven't got a pulumi project in front of me atm)prehistoric-london-9917
07/14/2021, 1:48 AMany
type when referenced later.