Skip to content
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

[Enhancement]: support service_region with aws_vpc_endpoint (privateLink consumer) #40438

Closed
aneesh-wolt opened this issue Dec 4, 2024 · 11 comments · Fixed by #40583
Closed
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/vpc Issues and PRs that pertain to the vpc service.
Milestone

Comments

@aneesh-wolt
Copy link

aneesh-wolt commented Dec 4, 2024

Description

aws_vpc_endpoint is missing service_region parameter for the PrivateLink service it connects to

Related to: #40346
This enhancement is missing a related feature with vpc_endpoint connections

VPC Endpoints should verify the service_name they attach to and the region should be provided when establishing a connection.
image

AWS Changes : https://github.com/aws/aws-sdk-go-v2/blob/release-2024-11-26/service/ec2/CHANGELOG.md#v11940-2024-11-26

Affected Resource(s) and/or Data Source(s)

aws_vpc_endpoint
data.aws_vpc_endpoint

Potential Terraform Configuration

provider "aws" {
  region = "us-west-2"
}

resource "aws_vpc_endpoint" "this" {
  vpc_id              = "vpc-id"
  service_name        = "com.amazonaws.vpce.eu-west-1.vpce-svc-1234567890"
  service_region      = "eu-west-1"
  vpc_endpoint_type   = "Interface"
  subnet_ids          = ["subnets"]
  private_dns_enabled = true
  security_group_ids  = ["sg-id"]
}

References

https://github.com/aws/aws-sdk-go-v2/blob/release-2024-11-26/service/ec2/CHANGELOG.md#v11940-2024-11-26
#40346

Would you like to implement a fix?

No

@aneesh-wolt aneesh-wolt added the enhancement Requests to existing resources that expand the functionality or scope. label Dec 4, 2024
Copy link

github-actions bot commented Dec 4, 2024

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added service/vpc Issues and PRs that pertain to the vpc service. needs-triage Waiting for first response or review from a maintainer. labels Dec 4, 2024
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Dec 4, 2024
@bacoboy-doordash
Copy link

bacoboy-doordash commented Dec 4, 2024

Confirmed this does not work even though the region is in the service name. Looks like a change is needed.

Should terraform pull the region automatically from the service name rather than force people to pass it?

Example:

com.amazonaws.vpce.eu-west-1.vpce-svc-1234567890abcdef01

would imply eu-west-1 ?

@MS99-9
Copy link
Contributor

MS99-9 commented Dec 8, 2024

Is anyone working on this issue? I want to try fixing it cc @ewbankkit

@drewtul
Copy link
Contributor

drewtul commented Dec 10, 2024

There are cases where the region may not be present in the service name, so there will need to be an parameter to specify service name explicitly.

@bacoboy-doordash
Copy link

That might be why they chose to be specific at the underlying API level. Was just an idea.

So has somebody picked this up? I peeked at @MS99-9's fork and didn't see any activity.

@MS99-9
Copy link
Contributor

MS99-9 commented Dec 12, 2024

@bacoboy-doordash I am working on it. Let me push my progress tomorrow latest. I added the service_region to the schema and updated the create function. I also added another function to verify that the service exists in this region. Currently I am adding the test functions and afterwards I will check read,update,destroy functions

@drewtul
Copy link
Contributor

drewtul commented Dec 13, 2024

That might be why they chose to be specific at the underlying API level. Was just an idea.

So has somebody picked this up? I peeked at @MS99-9's fork and didn't see any activity.

No worries, it was a good idea, it being automatic would be easier for users, I asked the same question.

@catrielg
Copy link

Kindly update the documentation when the feature is ready. I also don't see the new related argument for aws_vpc_endpoint_service since the feature was added for #40321

Copy link

Warning

This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v5.82.0 milestone Dec 18, 2024
Copy link

This functionality has been released in v5.82.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@CarlosLanderas
Copy link

CarlosLanderas commented Dec 19, 2024

Thanks for the contribution @MS99-9. I'm testing v 5.82.1 and I can confirm it works like a charm now when creating cross region VPC endpoints!

PD: Referencing my previous comment HERE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/vpc Issues and PRs that pertain to the vpc service.
Projects
None yet
7 participants