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

Closed
sjwl opened this issue Nov 9, 2024 · 5 comments
Closed

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

sjwl opened this issue Nov 9, 2024 · 5 comments
Labels

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

Copy link

This issue has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this issue will be closed in 10 days

@github-actions github-actions bot added the stale label Dec 10, 2024
Copy link

This issue was automatically closed because of stale in 10 days

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 21, 2024
@sebastianczech
Copy link
Contributor

@sjwl I've prepared solution for your problem - are you able to double check it , please ?

I was also thinking about creating additional example with non-AWS endpoint service, but I'm not sure if that should be a part of this PR #1152 or a new PR or we should not have such example at all.

@sebastianczech
Copy link
Contributor

@bryantbiggs are you able to take a look on PR #1152, please ?

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants