This message was deleted.
# typescript
s
This message was deleted.
e
b
TypeScript is upset about the type.
Copy code
Subnet ID to create the ENI in.

Type 'Promise<Subnet[]>' is not assignable to type 'Input<string>'.
  Type 'Promise<Subnet[]>' is not assignable to type 'Promise<string>'.
    Type 'Subnet[]' is not assignable to type 'string'.ts(2322)
networkInterface.d.ts(339, 5): The expected type comes from property 'subnetId' which is declared here on type 'NetworkInterfaceArgs'
e
Hmm maybe something like
output(vpc.privateSubnets()).apply(subnets => subnet[0].id)
?
b
thanks!
subnetId: output(vpc.getSubnets("private").then(subnet => subnet[0].id)),
gets the type error to go away 😄 lets see if it actually works!
looks like that worked! thanks @echoing-dinner-19531 on to the next issue :D
🙌 1