"multiple VPC Endpoints matched"

I am using a data “aws_vpc_endpoint” to retrieve multiple endpoint IDs based on the vpc ID. How can I retrieve these endpoints to reference them in another resource? Or is it possible to retrieve multiple endpoint from this data resource. Any suggestions? Or advice would be much appreciated.