Error: multiple VPC Endpoint Services matched; use additional constraints to reduce matches to a single VPC Endpoint Service

Tried following resolution in terraform script

data “aws_vpc_endpoint_service” “s3” {
count = var.create_vpc && var.enable_s3_endpoint ? 1 : 0

service = “s3”
filter {
name = “service-type”
values = [“Gateway”]
}
}

This makes no effect.

Second resolution effort,
Tried applying tag to the vpc gateway endpoint and filter from terarform script

data “aws_vpc_endpoint_service” “s3” {
count = var.create_vpc && var.enable_s3_endpoint ? 1 : 0

service = “s3”
filter {
name = “tag:type”
values = [“gateway”]
}
}
Error changes to - Error: no matching vpc endpoint found

but still nothing is affecting to get the single value for endpoint
aws cli commands on other hand work fine to filter single endpoint as per the tag so aws api responses seems fine

Providing details of Terraform and aws provider version
Terraform version - 0.12.24
AWS provider version - 3.10.0

Please let me know if any more details are required