-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws data provider Error: multiple VPC Endpoint Services matched #445
Comments
hi @jonathancolby-olx - this error message looks like there are are 2 s3 vpc endpoints and the data filter is unable to return just a single result (its returning multiple matches and the data source does not know how to handle multiple matches, it needs to converge on a single match). currently the filter criteria is just to match on the s3 service terraform-aws-vpc/vpc-endpoints.tf Line 7 in 26bb020
|
hi @jonathancolby-olx - were you able to check if an s3 endpoint already existed in the subnet(s) you are provisioning into? |
@bryantbiggs - This issue is resolved. The problem was not directly related to the terraform aws provider. However it might appear again for other users in the same situation. Our aws account was enrolled in the beta testing of the new "Interface Endpoint for S3". The interface endpoint was activated alongside the Gateway Endpoint. The terraform aws provider of course did not know how to distinguish between the two. Indeed it is expected that only one aws S3 endpoint is returned. Anyone in this beta testing program might run into the same issue. It's not clear whether both endpoints will be allow to be activated at the same time when the s3 interface endpoint feature is launched to production. This would determine whether the aws provider needs to filter the desired endpoint. |
@jonathancolby-olx did you ever figure out how to filter this? i'm getting the same thing, and having issues attempting to filter the ghost endpoint... update: eventually i landed on the following which worked:
|
@tony-kerz - see my last comment above. I recommend checking the vpc endpoints using the aws-cli. It may not be visible in the aws web console. check the "type" in the output. Make sure you do not have an endpoint with "interface". Maybe aws rolled this out to your account? Maybe post some error output. It's hard to say for sure what's going on in your situation.
|
Seems like the S3 Privatelink was rolled out earlier today and hence this issue became actual for others |
Confirmed with AWS Support several minutes ago; the rollout of S3 Privatelink is the culprit and the solution seems to be to unenroll from it. |
How do you unenroll? |
In our specific case, the S3 service team were the ones that created the PrivateLink's, so only they can remove it by raising a support ticket. Otherwise there is apparently an option to unenroll in the VPC console Although perhaps it's quicker to simply update to the latest Terraform VPC module, as that appears to have been released now |
yes, if you can @tombasche that is probably the easiest route and more future proof. note though, the Terraform AWS provider min version has been bumped now as part of this change - so if you can go up to v3.10.0 of the AWS provider then upgrading the VPC module would be the ideal route |
AWS just introduced private link for S3: https://aws.amazon.com/ru/blogs/aws/aws-privatelink-for-amazon-s3-now-available/ This currently breaks Terraform with the following error message: Error: multiple VPC Endpoint Services matched; use additional constraints to reduce matches to a single VPC Endpoint Service More on this issue here: terraform-aws-modules/terraform-aws-vpc#445 Tested that this upgrade doesn't force a rebuild of the infrastructure.
AWS just introduced private link for S3: https://aws.amazon.com/ru/blogs/aws/aws-privatelink-for-amazon-s3-now-available/ This currently breaks Terraform with the following error message: Error: multiple VPC Endpoint Services matched; use additional constraints to reduce matches to a single VPC Endpoint Service More on this issue here: terraform-aws-modules/terraform-aws-vpc#445 Tested that this upgrade doesn't force a rebuild of the infrastructure.
If you're not using the Terraform VPC module (like us who are using our own), it was enough of a fix to use AWS provider version 3.0 or higher, and add
|
how do we do this in terraform 11 - which goes only provider.aws: version = "~> 2.59" |
You can't. You need to upgrade to Terraform 0.13 at least. |
@shabir61 @dgonzalez you can pin to |
I am trying that but will need to create yet another provider as we have an RDS cluster that the plan for newer versions of the provider tries to recreate (I know, right?). I am planning to upgrade to 0.14 soon but this just hit us in the floating line: we cannot modify our infrastructure using Terraform at the moment. |
Adding to @KA-ROM 's comment, we were looping over different services with a
|
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
versions:
vpc module (this module): 2.33.0
terraform version: v0.12.21
terraform providers: v2.62.0
background info:
we use this TF codebase in 2 different accounts, and 2 different regions. the error only appears in one of the accounts in eu-west-1. in this account, we do have 2 custom vpc endpoints (PrivateLink services). Just a theory, but perhaps the aws_vpc_endpoint_service is incorrectly returning those endpoints, even though they are not S3.
creating this issue to see if anyone else is having the issue.
The text was updated successfully, but these errors were encountered: