- Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed as not planned
Closed as not planned
Copy link
Labels
service/ec2Issues and PRs that pertain to the ec2 service.Issues and PRs that pertain to the ec2 service.staleOld or inactive issues managed by automation, if no further action taken these will get closed.Old or inactive issues managed by automation, if no further action taken these will get closed.
Description
Problem
For those users who are encountering the following error when using the aws_vpc_endpoint_service data source:
Error: multiple VPC Endpoint Services matched; use additional constraints to reduce matches to a single VPC Endpoint Service- AWS have just released a new feature in S3 (PrivateLink) which means that multiple results are now being returned when searching for the S3 endpoint service.
- Singular data sources in the Terraform AWS Provider (like
aws_vpc_endpoint_service) return an error if multiple results are returned.
Configuration changes required to resolve the issue
Add a filter block to select a service type, e.g.
data "aws_vpc_endpoint_service" "s3" { service = "s3" filter { name = "service-type" values = ["Gateway"] } }For provider versions v3.10.0 and up, it is also possible to use the service_type argument for simplifying the configuration:
data "aws_vpc_endpoint_service" "s3" { service = "s3" service_type = "Gateway" }Please note that if you are using a Terraform module that relies on this datasource, the module itself will need to be updated. Terraform modules are not maintained by HashiCorp, so you will need to reach out to the modules maintainers to make that configuration update.
References
j0sh3rs, kjsingh, SpComb, acdha, tyrken and 8 more
Metadata
Metadata
Assignees
Labels
service/ec2Issues and PRs that pertain to the ec2 service.Issues and PRs that pertain to the ec2 service.staleOld or inactive issues managed by automation, if no further action taken these will get closed.Old or inactive issues managed by automation, if no further action taken these will get closed.