lemon-processor-10785
06/14/2022, 8:04 PMdef set_route_tables(subnetIds):
    for subnetId in subnetIds:
        # Get the current routeTable for the subnet. Pulumi creates a new table for each subnet via awsx in vpc creation
        routeTable=aws.ec2.get_route_table(subnet_id=subnetId)
        
        # Create the route to MongoDB Atlas
        mongoRoute=aws.ec2.Route(env + "-mongoroute-" + subnetId, 
            route_table_id=routeTable.id,
            destination_cidr_block=mongoContainer.results[0].atlasCidrBlock,
            vpc_peering_connection_id=mongoPeering.connectionId,
        )
vpc.private_subnet_ids.apply(lambda subnetIds: set_route_tables(subnetIds))