sparse-intern-71089
03/14/2019, 6:37 PMimportant-leather-28796
03/14/2019, 6:38 PMpulumi.Output<pulumi.Output<string>[]>
important-leather-28796
03/14/2019, 6:38 PMimport {Output} from '@pulumi/pulumi'
to shorten it upimportant-leather-28796
03/14/2019, 6:39 PMOutput<any>
, I was thinking Input typesfull-dress-10026
03/14/2019, 6:40 PMTS2740: Type 'Output<Output<string>[]>' is missing the following properties from type 'Input<string>[]': length, pop, push, concat, and 26 more.
important-leather-28796
03/14/2019, 6:40 PMfull-dress-10026
03/14/2019, 6:43 PMgetOutput
. If I do
myStack.getOutput("subnetIds").apply(x => { console.log(x); return x;})
x
is printed as an array.important-leather-28796
03/14/2019, 6:45 PMgetOutput
return type is overly vague since it could be one of many. It could possibly be parameterized to allow a return type, like getOutput<string[]>
to provide a better dev experience. As-is it is a cast either way to what you want to use.full-dress-10026
03/14/2019, 6:50 PMlet subnetIds = myStack.getOutput("subnetIds") as pulumi.Output<string[]>;
const vpc = awsx.ec2.Vpc.fromExistingIds("infra-vpc", {
vpcId: vpcId,
publicSubnetIds: subnetIds,
});
and the error is on the publicSubnetIds
line.full-dress-10026
03/14/2019, 6:50 PMOutput<Output<string>[]>
but publicSubnetIds
doesn't like that either.lemon-spoon-91807
03/15/2019, 3:52 AMlemon-spoon-91807
03/15/2019, 3:53 AMlemon-spoon-91807
03/15/2019, 3:53 AMlemon-spoon-91807
03/15/2019, 3:53 AMInput<Input<string>[]>
lemon-spoon-91807
03/15/2019, 3:53 AMOutput<string[]>
lemon-spoon-91807
03/15/2019, 3:54 AMpulumi.output(the_inputs)