Skip to content

Resource: awsVpcEndpointConnectionAccepter

Provides a resource to accept a pending VPC Endpoint Connection accept request to VPC Endpoint Service.

Example Usage

Accept cross-account request

/*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 awsVpcEndpointExample = new aws.vpcEndpoint.VpcEndpoint(this, "example", {
  privateDnsEnabled: false,
  provider: "aws.alternate",
  securityGroupIds: ["${aws_security_group.test.id}"],
  serviceName: "${aws_vpc_endpoint_service.test.service_name}",
  vpcEndpointType: "Interface",
  vpcId: "${aws_vpc.test_alternate.id}",
});
const awsVpcEndpointServiceExample =
  new aws.vpcEndpointService.VpcEndpointService(this, "example_1", {
    acceptanceRequired: false,
    networkLoadBalancerArns: ["${aws_lb.example.arn}"],
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsVpcEndpointServiceExample.overrideLogicalId("example");
const awsVpcEndpointConnectionAccepterExample =
  new aws.vpcEndpointConnectionAccepter.VpcEndpointConnectionAccepter(
    this,
    "example_2",
    {
      vpcEndpointId: awsVpcEndpointExample.id,
      vpcEndpointServiceId: awsVpcEndpointServiceExample.id,
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsVpcEndpointConnectionAccepterExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

  • vpcEndpointId - (Required) AWS VPC Endpoint ID.
  • vpcEndpointServiceId - (Required) AWS VPC Endpoint Service ID.

Attributes Reference

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

  • id - The ID of the VPC Endpoint Connection.
  • vpcEndpointState - State of the VPC Endpoint.

Import

VPC Endpoint Services can be imported using ID of the connection, which is the vpcEndpointServiceId and vpcEndpointId separated by underscore (_). e.g.

$ terraform import aws_vpc_endpoint_connection_accepter.foo vpce-svc-0f97a19d3fa8220bc_vpce-010601a6db371e263