This message was deleted.
# typescript
s
This message was deleted.
a
I ended up with something like:
Copy code
const allSubnets = vpc.privateSubnets.concat(vpc.publicSubnets)

let peeringRoutes: aws.ec2.Route[] = [];
let it = 0;
for (var sn of allSubnets) {
  if (sn.routeTableAssociation === undefined) {
    continue;
  }

  peeringRoutes.push(
    new aws.ec2.Route(`vpc-peering-route-${it}`, {
      destinationCidrBlock: "10.200.1.0/24",
      routeTableId: sn.routeTableAssociation.routeTableId,
      vpcPeeringConnectionId: workspaceToC1PeeringConnection.id
    })
  );
  it++;
}