This message was deleted.
# general
s
This message was deleted.
l
which bug are you referring to?
refresh my memory on the problem.
a
We were getting undefined as value when passing the stack ref to FargateService
l
what would you like to write instead?
i'm not seeing a problem with the above (except hte unncessary 'as's
you should just be able to do:
const vpcPrivateSubnetIds = <string[]>stackRef.requireOutputSync("vpcPrivateSubnetIds")
a
l
yes. the riht solution is just getOutputSync (or requireOutputSync)
it's effectively 'by design' that getOutput returns an
Output<whatever>
and its by design that vpc.fromExistingIds needs a realized list of values.
a
ok, I will remove the extra casts
ty
I see that the type is
pulumi.Input<string>[]
though? Am I misunderstanding that it needs to be unwrapped?
Per
ExistingVpcIdArgs
l
"unwrapped"?
so a
string[]
is a
Input<string>[]
a
Ok, it works, was able to get rid of the extra casts,
Copy code
const vpcId = stackRef.requireOutputSync("vpcId");
const vpcPrivateSubnetIds = <string[]>stackRef.requireOutputSync("vpcPrivateSubnetIds");
const vpcPublicSubnetIds = <string[]>stackRef.requireOutputSync("vpcPublicSubnetIds");
const vpc = awsx.ec2.Vpc.fromExistingIds("vpc", {
  privateSubnetIds: vpcPrivateSubnetIds,
  publicSubnetIds: vpcPublicSubnetIds,
  vpcId
});
l
yup yup
gotta run to a meeting. lmk later ift here are other issues youhave!