Resource: aws_vpc_endpoint_service

Provides a VPC Endpoint Service resource. Service consumers can create an _Interface_ VPC Endpoint to connect to the service.

Example Usage

Network Load Balancers

resource "aws_vpc_endpoint_service" "example" {
  acceptance_required        = false
  network_load_balancer_arns = [aws_lb.example.arn]
}

Gateway Load Balancers

resource "aws_vpc_endpoint_service" "example" {
  acceptance_required        = false
  gateway_load_balancer_arns = [aws_lb.example.arn]
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import VPC Endpoint Services using the VPC endpoint service id. For example:

import {
  to = aws_vpc_endpoint_service.foo
  id = "vpce-svc-0f97a19d3fa8220bc"
}

Using terraform import, import VPC Endpoint Services using the VPC endpoint service id. For example:

% terraform import aws_vpc_endpoint_service.foo vpce-svc-0f97a19d3fa8220bc