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

PrivateLink support #114

Open
shinenelson opened this issue Nov 5, 2022 · 0 comments
Open

PrivateLink support #114

shinenelson opened this issue Nov 5, 2022 · 0 comments

Comments

@shinenelson
Copy link

shinenelson commented Nov 5, 2022

Describe the Feature

It would be great to have the vpc-endpoints submodule support AWS PrivateLink services as well. In general, any non-standard service that is supported by AWS' VPC Endpoints service.

Use Case

When partnering with external services, they often expose an AWS PrivateLink that customers can use. Since the vpc-endpoints submodule already supports the official AWS services, it would be prudent to support non-official services as well.

Describe Ideal Solution

The vpc-endpoints submodule supports the service_name in

data "aws_vpc_endpoint_service" "interface_endpoint_service" {

We could expose a new input, say, service_type that might accept 'internal' or 'external' as values. Based on that input, we could decide whether to use the service or service_name arguments in the aws_vpc_endpoint_service data source.

Alternatives Considered

I hacked my local vendored module to change service to service_name to experiment whether it would work.

diff --git a/modules/vpc-endpoints/main.tf b/modules/vpc-endpoints/main.tf
 data "aws_vpc_endpoint_service" "interface_endpoint_service" {
   for_each     = local.enabled ? var.interface_vpc_endpoints : {}
-  service      = var.interface_vpc_endpoints[each.key].name
+  service_name = var.interface_vpc_endpoints[each.key].name
   service_type = "Interface"
 }

It worked straight-forward with no other change to the vendored module. That is why I thought that this might be easy to implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant