-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Better diagnostics for “multiple VPC Endpoint Services matched” #17415
Comments
For folks that may show up here because of the S3 PrivateLink API changes today, the above Terraform Module has an update that can help address it. For Terraform configurations which had: data "aws_vpc_endpoint_service" "s3" {
service = "s3"
} They can be updated to: data "aws_vpc_endpoint_service" "s3" {
service = "s3"
service_type = "Gateway"
} To keep the previous behavior. |
data.aws_vpc_endpoint_service.s3 can use service_type as |
Hello, Is there any way to deal with this change when using Terraform 11, either through the use of filters or other methods? The updated syntax mentioned above was only introduced in 3.10.0, and we have existing code which maintains baselines for accounts which is still on the 2.6x.0 series. In the absence of a service_type which can be configured, I wonder if the data call could somehow default to the legacy endpoint type of gateway (as that is backwards-compatible). |
@jqassar you can workaround the data source issue in versions older than 3.10.0 by replacing any references with With the aws_region data source: data "aws_region" "current" {}
# ... other local/resource/output that needs the value ...
... = "com.amazonaws.${data.aws_region.current.name}.s3" |
@bflad, thank you for the tip. EDIT: For those experiencing a similar issue, we were able to use the fix above without any obvious destructive changes. |
For continuing updates on the particular error I am going to leave this issue open for tracking any potential changes to the error information surfaced in the Terraform CLI plan output, such as adding more context about which data source is failing and on what API operation. 👍 |
@bflad Thank you - that is exactly what I was hoping for |
Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you! |
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. |
Community Note
Description
Under some conditions the
aws_vpc_endpoint_service
data provider can return this message:It would be nice if this message listed, for example, the resource in question or the queried service. In my case, this was caused by a module (terraform-aws-modules/terraform-aws-vpc#573 — upgrade to 2.69 or later to get the fix) but the error message did not make that easy to identify and a trace log has hundreds of different resources to review.
New or Affected Resource(s)
The text was updated successfully, but these errors were encountered: