Data Source: aws_vpc_endpoint_service

The VPC Endpoint Service data source details about a specific service that can be specified when creating a VPC endpoint within the region configured in the provider.

Example Usage

AWS Service

# Declare the data source
data "aws_vpc_endpoint_service" "s3" {
  service      = "s3"
  service_type = "Gateway"
}

# Create a VPC
resource "aws_vpc" "foo" {
  cidr_block = "10.0.0.0/16"
}

# Create a VPC endpoint
resource "aws_vpc_endpoint" "ep" {
  vpc_id       = aws_vpc.foo.id
  service_name = data.aws_vpc_endpoint_service.s3.service_name
}

Non-AWS Service

data "aws_vpc_endpoint_service" "custome" {
  service_name = "com.amazonaws.vpce.us-west-2.vpce-svc-0e87519c997c63cd8"
}

Filter

data "aws_vpc_endpoint_service" "test" {
  filter {
    name   = "service-name"
    values = ["some-service"]
  }
}

Argument Reference

The arguments of this data source act as filters for querying the available VPC endpoint services. The given filters must match exactly one VPC endpoint service whose data will be exported as attributes.

filter Configuration Block

The filter configuration block supports the following arguments:

Attribute Reference

This data source exports the following attributes in addition to the arguments above:

Timeouts

Configuration options: