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

module vpc-endpoints to support non-AWS endpoint services #1134

Open
sjwl opened this issue Nov 9, 2024 · 0 comments
Open

module vpc-endpoints to support non-AWS endpoint services #1134

sjwl opened this issue Nov 9, 2024 · 0 comments

Comments

@sjwl
Copy link

sjwl commented Nov 9, 2024

Is your request related to a problem? Please describe.

when trying to add a vpc endpoint to a non-AWS service, I see this error

│ Error: multiple EC2 VPC Endpoint Services matched; use additional constraints to reduce matches to a single EC2 VPC Endpoint Service
│ 
│   with module.vpc_endpoints.data.aws_vpc_endpoint_service.this["my_company_artifactory"],
│   on .terraform/modules/vpc_endpoints/modules/vpc-endpoints/main.tf line 11, in data "aws_vpc_endpoint_service" "this":
│   11: data "aws_vpc_endpoint_service" "this" {

Describe the solution you'd like.

Similar to how this documentation shows how to create a vpc endpoint to a non-AWS service, the vpc-endpoints module should document how to support this scenario.

Describe alternatives you've considered.

a workaround is to insert a dummy line service = "s3" like so

module "vpc_endpoints" {
  source = "terraform-aws-modules/vpc/aws//modules/vpc-endpoints"
  version = "v5.7.0"

  create = var.create_vpc_endpoints && var.create_vpc

  vpc_id = try(module.vpc[0].vpc_id, null)
  create_security_group = false

  endpoints = {
    my_company_artifactory = {
      service = "s3" #hack workaround
      service_endpoint = "com.amazonaws.vpce.us-west-2.vpce-svc-07<redacted>b4"
      subnet_ids = try(module.vpc[0].private_subnets, [])
    }
  }
}

Additional context

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