pulumi_wasm_providers_aws_mini::ec2

Module security_group_association

source
Expand description

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

NOTE on VPC Endpoints and VPC Endpoint Security Group Associations: The provider provides both a standalone VPC Endpoint Security Group Association (an association between a VPC endpoint and a single security_group_id) and a VPC Endpoint resource with a security_group_ids attribute. Do not use the same security group ID in both a VPC Endpoint resource and a VPC Endpoint Security Group 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 sgEc2 = security_group_association::create(
        "sgEc2",
        SecurityGroupAssociationArgs::builder()
            .security_group_id("${sg.id}")
            .vpc_endpoint_id("${ec2.id}")
            .build_struct(),
    );
}

Structs§

Functions§

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