https://pulumi.com logo
#aws
Title
# aws
f

freezing-artist-36980

09/10/2022, 3:20 PM
How do I add subnets of a vpc to vpc connector? I tried adding like this:
const vpcConnector = new awsc.apprunner.VpcConnector("vpc-connector", {
securityGroups: [ec2SecurityGroup.id],
subnets: [pulumi.output(vpc.getSubnetsIds)], // ERROR HERE!
vpcConnectorName: "my-vpc-connector",
});
But it throws error:
1. Type 'Output<(type: VpcSubnetType) => Promise<Output<string>[]>>[]' is not assignable to type 'Input<Input<string>[]>'.
f

freezing-artist-36980

09/10/2022, 11:42 PM
Sorry, I tried
.all
and
.concat
but still not working.
l

little-cartoon-10569

09/11/2022, 9:26 PM
That error message says it's trying to wrap a fat arrow function in a
pulumi.Output
, instead of an array of string outputs, and that needs to be resolved. What's the type of
vpc.getSubnetsIds
? Is it a member or method that you've created? Or a typo?
2 Views