pulumi_wasm_providers_aws_mini::ec2

Module vpc_endpoint_subnet_association

source
Expand description

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:

use pulumi_wasm_rust::Output;
use pulumi_wasm_rust::{add_export, pulumi_main};
#[pulumi_main]
fn test_main() -> Result<(), Error> {
    let snEc2 = vpc_endpoint_subnet_association::create(
        "snEc2",
        VpcEndpointSubnetAssociationArgs::builder()
            .subnet_id("${sn.id}")
            .vpc_endpoint_id("${ec2.id}")
            .build_struct(),
    );
}

§Import

Using pulumi import, import VPC Endpoint Subnet Associations using vpc_endpoint_id together with subnet_id. For example:

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

Structs§

Functions§

  • Registers a new resource with the given unique name and arguments