1. Registry
  2. Packages
  3. AWS Cloud Control
  4. API Docs
  5. ec2
  6. SecurityGroupVpcAssociation

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.86.0
published on Wednesday, Nov 18, 2026 by Pulumi
aws-native logo aws-native logo AWS Cloud Control

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.86.0
published on Wednesday, Nov 18, 2026 by Pulumi

    Resource type definition for the AWS::EC2::SecurityGroupVpcAssociation resource

    Create SecurityGroupVpcAssociation Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SecurityGroupVpcAssociation(name: string, args: SecurityGroupVpcAssociationArgs, opts?: CustomResourceOptions);
    @overload
    def SecurityGroupVpcAssociation(resource_name: str,
                                    args: SecurityGroupVpcAssociationArgs,
                                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecurityGroupVpcAssociation(resource_name: str,
                                    opts: Optional[ResourceOptions] = None,
                                    group_id: Optional[str] = None,
                                    vpc_id: Optional[str] = None)
    func NewSecurityGroupVpcAssociation(ctx *Context, name string, args SecurityGroupVpcAssociationArgs, opts ...ResourceOption) (*SecurityGroupVpcAssociation, error)
    public SecurityGroupVpcAssociation(string name, SecurityGroupVpcAssociationArgs args, CustomResourceOptions? opts = null)
    public SecurityGroupVpcAssociation(String name, SecurityGroupVpcAssociationArgs args)
    public SecurityGroupVpcAssociation(String name, SecurityGroupVpcAssociationArgs args, CustomResourceOptions options)
    
    type: aws-native:ec2:SecurityGroupVpcAssociation
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "aws-native_ec2_security_group_vpc_association" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args SecurityGroupVpcAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SecurityGroupVpcAssociationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SecurityGroupVpcAssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecurityGroupVpcAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecurityGroupVpcAssociationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    SecurityGroupVpcAssociation Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The SecurityGroupVpcAssociation resource accepts the following input properties:

    GroupId string
    The group ID of the specified security group.
    VpcId string
    The ID of the VPC in the security group vpc association.
    GroupId string
    The group ID of the specified security group.
    VpcId string
    The ID of the VPC in the security group vpc association.
    group_id string
    The group ID of the specified security group.
    vpc_id string
    The ID of the VPC in the security group vpc association.
    groupId String
    The group ID of the specified security group.
    vpcId String
    The ID of the VPC in the security group vpc association.
    groupId string
    The group ID of the specified security group.
    vpcId string
    The ID of the VPC in the security group vpc association.
    group_id str
    The group ID of the specified security group.
    vpc_id str
    The ID of the VPC in the security group vpc association.
    groupId String
    The group ID of the specified security group.
    vpcId String
    The ID of the VPC in the security group vpc association.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SecurityGroupVpcAssociation resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    State Pulumi.AwsNative.Ec2.SecurityGroupVpcAssociationState
    The state of the security group vpc association.
    StateReason string
    The reason for the state of the security group vpc association.
    VpcOwnerId string
    The owner of the VPC in the security group vpc association.
    Id string
    The provider-assigned unique ID for this managed resource.
    State SecurityGroupVpcAssociationStateEnum
    The state of the security group vpc association.
    StateReason string
    The reason for the state of the security group vpc association.
    VpcOwnerId string
    The owner of the VPC in the security group vpc association.
    id string
    The provider-assigned unique ID for this managed resource.
    state "associating" | "associated" | "association-failed" | "disassociating" | "disassociated" | "disassociation-failed"
    The state of the security group vpc association.
    state_reason string
    The reason for the state of the security group vpc association.
    vpc_owner_id string
    The owner of the VPC in the security group vpc association.
    id String
    The provider-assigned unique ID for this managed resource.
    state SecurityGroupVpcAssociationState
    The state of the security group vpc association.
    stateReason String
    The reason for the state of the security group vpc association.
    vpcOwnerId String
    The owner of the VPC in the security group vpc association.
    id string
    The provider-assigned unique ID for this managed resource.
    state SecurityGroupVpcAssociationState
    The state of the security group vpc association.
    stateReason string
    The reason for the state of the security group vpc association.
    vpcOwnerId string
    The owner of the VPC in the security group vpc association.
    id str
    The provider-assigned unique ID for this managed resource.
    state SecurityGroupVpcAssociationState
    The state of the security group vpc association.
    state_reason str
    The reason for the state of the security group vpc association.
    vpc_owner_id str
    The owner of the VPC in the security group vpc association.
    id String
    The provider-assigned unique ID for this managed resource.
    state "associating" | "associated" | "association-failed" | "disassociating" | "disassociated" | "disassociation-failed"
    The state of the security group vpc association.
    stateReason String
    The reason for the state of the security group vpc association.
    vpcOwnerId String
    The owner of the VPC in the security group vpc association.

    Look up Existing SecurityGroupVpcAssociation Resource

    Get an existing SecurityGroupVpcAssociation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, opts?: CustomResourceOptions): SecurityGroupVpcAssociation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None) -> SecurityGroupVpcAssociation
    func GetSecurityGroupVpcAssociation(ctx *Context, name string, id IDInput, state *SecurityGroupVpcAssociationState, opts ...ResourceOption) (*SecurityGroupVpcAssociation, error)
    public static SecurityGroupVpcAssociation Get(string name, Input<string> id, CustomResourceOptions? opts = null)
    public static SecurityGroupVpcAssociation get(String name, Output<String> id, CustomResourceOptions options)
    resources:  existingSecurityGroupVpcAssociation:    type: aws-native:ec2:SecurityGroupVpcAssociation    get:      id: ${id}
    import {
      to = aws-native_ec2_security_group_vpc_association.example
      id = "${id}"
    }
    
    name string
    The unique name of the resulting resource.
    id Input<ID>
    The unique provider ID of the resource to look up.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resulting resource.
    id str
    The unique provider ID of the resource to look up.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resulting resource.
    id IDInput
    The unique provider ID of the resource to look up.
    state SecurityGroupVpcAssociationState
    Pass nil. This resource has no state arguments.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resulting resource.
    id Input<string>
    The unique provider ID of the resource to look up.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resulting resource.
    id Output<String>
    The unique provider ID of the resource to look up.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Supporting Types

    SecurityGroupVpcAssociationState

    NameValue
    Associatingassociating
    Associatedassociated
    AssociationFailedassociation-failed
    Disassociatingdisassociating
    Disassociateddisassociated
    DisassociationFaileddisassociation-failed
    NameValue
    SecurityGroupVpcAssociationStateAssociatingassociating
    SecurityGroupVpcAssociationStateAssociatedassociated
    SecurityGroupVpcAssociationStateAssociationFailedassociation-failed
    SecurityGroupVpcAssociationStateDisassociatingdisassociating
    SecurityGroupVpcAssociationStateDisassociateddisassociated
    SecurityGroupVpcAssociationStateDisassociationFaileddisassociation-failed
    Value
    associating
    associated
    association-failed
    disassociating
    disassociated
    disassociation-failed
    NameValue
    Associatingassociating
    Associatedassociated
    AssociationFailedassociation-failed
    Disassociatingdisassociating
    Disassociateddisassociated
    DisassociationFaileddisassociation-failed
    NameValue
    Associatingassociating
    Associatedassociated
    AssociationFailedassociation-failed
    Disassociatingdisassociating
    Disassociateddisassociated
    DisassociationFaileddisassociation-failed
    NameValue
    ASSOCIATINGassociating
    ASSOCIATEDassociated
    ASSOCIATION_FAILEDassociation-failed
    DISASSOCIATINGdisassociating
    DISASSOCIATEDdisassociated
    DISASSOCIATION_FAILEDdisassociation-failed
    Value
    associating
    associated
    association-failed
    disassociating
    disassociated
    disassociation-failed

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo aws-native logo AWS Cloud Control

    We recommend new projects start with resources from the AWS provider.

    Viewing docs for AWS Cloud Control v1.86.0
    published on Wednesday, Nov 18, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial