Skip to content

Data Source: awsVpcEndpointService

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

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsVpcFoo = new aws.vpc.Vpc(this, "foo", {
  cidrBlock: "10.0.0.0/16",
});
const dataAwsVpcEndpointServiceS3 =
  new aws.dataAwsVpcEndpointService.DataAwsVpcEndpointService(this, "s3", {
    service: "s3",
    serviceType: "Gateway",
  });
new aws.vpcEndpoint.VpcEndpoint(this, "ep", {
  serviceName: dataAwsVpcEndpointServiceS3.serviceName,
  vpcId: awsVpcFoo.id,
});

Non-AWS Service

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.dataAwsVpcEndpointService.DataAwsVpcEndpointService(this, "custome", {
  serviceName: "com.amazonaws.vpce.us-west-2.vpce-svc-0e87519c997c63cd8",
});

Filter

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.dataAwsVpcEndpointService.DataAwsVpcEndpointService(this, "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 - (Optional) Configuration block(s) for filtering. Detailed below.
  • service - (Optional) Common name of an AWS service (e.g., s3).
  • serviceName - (Optional) Service name that is specified when creating a VPC endpoint. For AWS services the service name is usually in the form comAmazonaws.<region>.<service> (the SageMaker Notebook service is an exception to this rule, the service name is in the form awsSagemaker.<region>Notebook).
  • serviceType - (Optional) Service type, gateway or interface.
  • tags - (Optional) Map of tags, each pair of which must exactly match a pair on the desired VPC Endpoint Service.

\~> NOTE: Specifying service will not work for non-AWS services or AWS services that don't follow the standard serviceName pattern of comAmazonaws.<region>.<service>.

filter Configuration Block

The following arguments are supported by the filter configuration block:

  • name - (Required) Name of the filter field. Valid values can be found in the EC2 DescribeVpcEndpointServices API Reference.
  • values - (Required) Set of values that are accepted for the given filter field. Results will be selected if any given value matches.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • acceptanceRequired - Whether or not VPC endpoint connection requests to the service must be accepted by the service owner - true or false.
  • arn - ARN of the VPC endpoint service.
  • availabilityZones - Availability Zones in which the service is available.
  • baseEndpointDnsNames - The DNS names for the service.
  • managesVpcEndpoints - Whether or not the service manages its VPC endpoints - true or false.
  • owner - AWS account ID of the service owner or amazon.
  • privateDnsName - Private DNS name for the service.
  • serviceId - ID of the endpoint service.
  • supportedIpAddressTypes - The supported IP address types.
  • tags - Map of tags assigned to the resource.
  • vpcEndpointPolicySupported - Whether or not the service supports endpoint policies - true or false.

Timeouts

Configuration options:

  • read - (Default 20M)