VpcEndpointSubnetAssociationArgs

data class VpcEndpointSubnetAssociationArgs(val subnetId: Output<String>? = null, val vpcEndpointId: Output<String>? = null) : ConvertibleToJava<VpcEndpointSubnetAssociationArgs>

Provides a resource to create an association between a VPC endpoint and a subnet.

NOTE on VPC Endpoints and VPC Endpoint Subnet Associations: This provider provides both a standalone VPC Endpoint Subnet Association (an association between a VPC endpoint and a single subnet_id) and a VPC Endpoint resource with a subnet_ids 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:

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.VpcEndpointSubnetAssociation;
import com.pulumi.aws.ec2.VpcEndpointSubnetAssociationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var snEc2 = new VpcEndpointSubnetAssociation("snEc2", VpcEndpointSubnetAssociationArgs.builder()
.vpcEndpointId(aws_vpc_endpoint.ec2().id())
.subnetId(aws_subnet.sn().id())
.build());
}
}

Import

VPC Endpoint Subnet Associations can be imported using vpc_endpoint_id together with subnet_id, e.g.,

$ pulumi import aws:ec2/vpcEndpointSubnetAssociation:VpcEndpointSubnetAssociation example vpce-aaaaaaaa/subnet-bbbbbbbbbbbbbbbbb

Constructors

Link copied to clipboard
constructor(subnetId: Output<String>? = null, vpcEndpointId: Output<String>? = null)

Properties

Link copied to clipboard
val subnetId: Output<String>? = null

The ID of the subnet to be associated with the VPC endpoint.

Link copied to clipboard
val vpcEndpointId: Output<String>? = null

The ID of the VPC endpoint with which the subnet will be associated.

Functions

Link copied to clipboard
open override fun toJava(): VpcEndpointSubnetAssociationArgs