Resource: awsVpcEndpointSubnetAssociation
Provides a resource to create an association between a VPC endpoint and a subnet.
\~> NOTE on VPC Endpoints and VPC Endpoint Subnet Associations: Terraform provides both a standalone VPC Endpoint Subnet Association (an association between a VPC endpoint and a single subnetId
) and a VPC Endpoint resource with a subnetIds
attribute. Do not use the same subnet ID in both a VPC Endpoint resource and a VPC Endpoint Subnet Association resource. Doing so will cause a conflict of associations and will overwrite the association.
Example Usage
Basic usage:
/*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.vpcEndpointSubnetAssociation.VpcEndpointSubnetAssociation(
this,
"sn_ec2",
{
subnetId: "${aws_subnet.sn.id}",
vpcEndpointId: "${aws_vpc_endpoint.ec2.id}",
}
);
Argument Reference
The following arguments are supported:
vpcEndpointId
- (Required) The ID of the VPC endpoint with which the subnet will be associated.subnetId
- (Required) The ID of the subnet to be associated with the VPC endpoint.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- The ID of the association.
Timeouts
create
- (Default10M
)delete
- (Default10M
)
Import
VPC Endpoint Subnet Associations can be imported using vpcEndpointId
together with subnetId
, e.g.,