SecurityGroupAssociation

class SecurityGroupAssociation : KotlinCustomResource

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:

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.SecurityGroupAssociation;
import com.pulumi.aws.ec2.SecurityGroupAssociationArgs;
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 sgEc2 = new SecurityGroupAssociation("sgEc2", SecurityGroupAssociationArgs.builder()
.vpcEndpointId(aws_vpc_endpoint.ec2().id())
.securityGroupId(aws_security_group.sg().id())
.build());
}
}

Properties

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Whether this association should replace the association with the VPC's default security group that is created when no security groups are specified during VPC endpoint creation. At most 1 association per-VPC endpoint should be configured with replace_default_association = true.

Link copied to clipboard
val securityGroupId: Output<String>

The ID of the security group to be associated with the VPC endpoint.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val vpcEndpointId: Output<String>

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