1. Registry
  2. Packages
  3. Selectel Provider
  4. API Docs
  5. VpcPortSecgroupAssociateV2
Viewing docs for selectel 9.5.0
published on Friday, Oct 30, 2026 by selectel
selectel
Viewing docs for selectel 9.5.0
published on Friday, Oct 30, 2026 by selectel

    Creates and manages the association between security groups and an existing port using the v2 public API. For more information about security groups, see the official Selectel documentation.

    The resource addresses the port by identifier, never creates or deletes it, and does not manage any of its other attributes. Do not manage the same port with both this resource and the security_group_ids argument of selectel.VpcPortV2.

    If you are upgrading from a version earlier than 9.1.0, follow the upgrade guide to migrate your resources from the OpenStack provider.

    Example Usage

    Security group added to the existing groups of the port

    import * as pulumi from "@pulumi/pulumi";
    import * as selectel from "@pulumi/selectel";
    
    const associate1 = new selectel.VpcPortSecgroupAssociateV2("associate_1", {
        projectId: project1.id,
        region: "ru-6",
        portId: port1.id,
        securityGroupIds: [secgroup1.id],
    });
    
    import pulumi
    import pulumi_selectel as selectel
    
    associate1 = selectel.VpcPortSecgroupAssociateV2("associate_1",
        project_id=project1["id"],
        region="ru-6",
        port_id=port1["id"],
        security_group_ids=[secgroup1["id"]])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/selectel/v9/selectel"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := selectel.NewVpcPortSecgroupAssociateV2(ctx, "associate_1", &selectel.VpcPortSecgroupAssociateV2Args{
    			ProjectId: pulumi.Any(project1.Id),
    			Region:    pulumi.String("ru-6"),
    			PortId:    pulumi.Any(port1.Id),
    			SecurityGroupIds: pulumi.StringArray{
    				secgroup1.Id,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Selectel = Pulumi.Selectel;
    
    return await Deployment.RunAsync(() => 
    {
        var associate1 = new Selectel.VpcPortSecgroupAssociateV2("associate_1", new()
        {
            ProjectId = project1.Id,
            Region = "ru-6",
            PortId = port1.Id,
            SecurityGroupIds = new[]
            {
                secgroup1.Id,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.selectel.VpcPortSecgroupAssociateV2;
    import com.pulumi.selectel.VpcPortSecgroupAssociateV2Args;
    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 associate1 = new VpcPortSecgroupAssociateV2("associate1", VpcPortSecgroupAssociateV2Args.builder()
                .projectId(project1.id())
                .region("ru-6")
                .portId(port1.id())
                .securityGroupIds(secgroup1.id())
                .build());
    
        }
    }
    
    resources:
      associate1:
        type: selectel:VpcPortSecgroupAssociateV2
        name: associate_1
        properties:
          projectId: ${project1.id}
          region: ru-6
          portId: ${port1.id}
          securityGroupIds:
            - ${secgroup1.id}
    
    Example coming soon!
    

    Security groups that replace the existing groups of the port

    import * as pulumi from "@pulumi/pulumi";
    import * as selectel from "@pulumi/selectel";
    
    const associate2 = new selectel.VpcPortSecgroupAssociateV2("associate_2", {
        projectId: project1.id,
        region: "ru-6",
        portId: port1.id,
        securityGroupIds: [secgroup1.id],
        enforce: true,
    });
    
    import pulumi
    import pulumi_selectel as selectel
    
    associate2 = selectel.VpcPortSecgroupAssociateV2("associate_2",
        project_id=project1["id"],
        region="ru-6",
        port_id=port1["id"],
        security_group_ids=[secgroup1["id"]],
        enforce=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/selectel/v9/selectel"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := selectel.NewVpcPortSecgroupAssociateV2(ctx, "associate_2", &selectel.VpcPortSecgroupAssociateV2Args{
    			ProjectId: pulumi.Any(project1.Id),
    			Region:    pulumi.String("ru-6"),
    			PortId:    pulumi.Any(port1.Id),
    			SecurityGroupIds: pulumi.StringArray{
    				secgroup1.Id,
    			},
    			Enforce: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Selectel = Pulumi.Selectel;
    
    return await Deployment.RunAsync(() => 
    {
        var associate2 = new Selectel.VpcPortSecgroupAssociateV2("associate_2", new()
        {
            ProjectId = project1.Id,
            Region = "ru-6",
            PortId = port1.Id,
            SecurityGroupIds = new[]
            {
                secgroup1.Id,
            },
            Enforce = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.selectel.VpcPortSecgroupAssociateV2;
    import com.pulumi.selectel.VpcPortSecgroupAssociateV2Args;
    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 associate2 = new VpcPortSecgroupAssociateV2("associate2", VpcPortSecgroupAssociateV2Args.builder()
                .projectId(project1.id())
                .region("ru-6")
                .portId(port1.id())
                .securityGroupIds(secgroup1.id())
                .enforce(true)
                .build());
    
        }
    }
    
    resources:
      associate2:
        type: selectel:VpcPortSecgroupAssociateV2
        name: associate_2
        properties:
          projectId: ${project1.id}
          region: ru-6
          portId: ${port1.id}
          securityGroupIds:
            - ${secgroup1.id}
          enforce: true
    
    Example coming soon!
    

    Create VpcPortSecgroupAssociateV2 Resource

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

    Constructor syntax

    new VpcPortSecgroupAssociateV2(name: string, args: VpcPortSecgroupAssociateV2Args, opts?: CustomResourceOptions);
    @overload
    def VpcPortSecgroupAssociateV2(resource_name: str,
                                   args: VpcPortSecgroupAssociateV2Args,
                                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def VpcPortSecgroupAssociateV2(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   port_id: Optional[str] = None,
                                   project_id: Optional[str] = None,
                                   region: Optional[str] = None,
                                   security_group_ids: Optional[Sequence[str]] = None,
                                   enforce: Optional[bool] = None)
    func NewVpcPortSecgroupAssociateV2(ctx *Context, name string, args VpcPortSecgroupAssociateV2Args, opts ...ResourceOption) (*VpcPortSecgroupAssociateV2, error)
    public VpcPortSecgroupAssociateV2(string name, VpcPortSecgroupAssociateV2Args args, CustomResourceOptions? opts = null)
    public VpcPortSecgroupAssociateV2(String name, VpcPortSecgroupAssociateV2Args args)
    public VpcPortSecgroupAssociateV2(String name, VpcPortSecgroupAssociateV2Args args, CustomResourceOptions options)
    
    type: selectel:VpcPortSecgroupAssociateV2
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "selectel_vpc_port_secgroup_associate_v2" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args VpcPortSecgroupAssociateV2Args
    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 VpcPortSecgroupAssociateV2Args
    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 VpcPortSecgroupAssociateV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpcPortSecgroupAssociateV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpcPortSecgroupAssociateV2Args
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var vpcPortSecgroupAssociateV2Resource = new Selectel.VpcPortSecgroupAssociateV2("vpcPortSecgroupAssociateV2Resource", new()
    {
        PortId = "string",
        ProjectId = "string",
        Region = "string",
        SecurityGroupIds = new[]
        {
            "string",
        },
        Enforce = false,
    });
    
    example, err := selectel.NewVpcPortSecgroupAssociateV2(ctx, "vpcPortSecgroupAssociateV2Resource", &selectel.VpcPortSecgroupAssociateV2Args{
    	PortId:    pulumi.String("string"),
    	ProjectId: pulumi.String("string"),
    	Region:    pulumi.String("string"),
    	SecurityGroupIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Enforce: pulumi.Bool(false),
    })
    
    resource "selectel_vpc_port_secgroup_associate_v2" "vpcPortSecgroupAssociateV2Resource" {
      lifecycle {
        create_before_destroy = true
      }
      port_id            = "string"
      project_id         = "string"
      region             = "string"
      security_group_ids = ["string"]
      enforce            = false
    }
    
    var vpcPortSecgroupAssociateV2Resource = new VpcPortSecgroupAssociateV2("vpcPortSecgroupAssociateV2Resource", VpcPortSecgroupAssociateV2Args.builder()
        .portId("string")
        .projectId("string")
        .region("string")
        .securityGroupIds("string")
        .enforce(false)
        .build());
    
    vpc_port_secgroup_associate_v2_resource = selectel.VpcPortSecgroupAssociateV2("vpcPortSecgroupAssociateV2Resource",
        port_id="string",
        project_id="string",
        region="string",
        security_group_ids=["string"],
        enforce=False)
    
    const vpcPortSecgroupAssociateV2Resource = new selectel.VpcPortSecgroupAssociateV2("vpcPortSecgroupAssociateV2Resource", {
        portId: "string",
        projectId: "string",
        region: "string",
        securityGroupIds: ["string"],
        enforce: false,
    });
    
    type: selectel:VpcPortSecgroupAssociateV2
    properties:
        enforce: false
        portId: string
        projectId: string
        region: string
        securityGroupIds:
            - string
    

    VpcPortSecgroupAssociateV2 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 VpcPortSecgroupAssociateV2 resource accepts the following input properties:

    PortId string
    Unique identifier of the port. Retrieved from the selectelvpcport_v2 resource. Changing this creates a new port security group association.
    ProjectId string
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new port security group association.
    Region string
    Pool where the port security group association is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port security group association.
    SecurityGroupIds List<string>
    Unique identifiers of the security groups this resource manages on the port. Retrieved from the selectelvpcsecgroup_v2 resource.
    Enforce bool
    Specifies if security_group_ids replaces the port's list of security groups or is appended to it. If false, deleting the resource removes from the port only the groups listed in security_group_ids. If true, deleting the resource removes all security groups from the port. The default value is false.
    PortId string
    Unique identifier of the port. Retrieved from the selectelvpcport_v2 resource. Changing this creates a new port security group association.
    ProjectId string
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new port security group association.
    Region string
    Pool where the port security group association is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port security group association.
    SecurityGroupIds []string
    Unique identifiers of the security groups this resource manages on the port. Retrieved from the selectelvpcsecgroup_v2 resource.
    Enforce bool
    Specifies if security_group_ids replaces the port's list of security groups or is appended to it. If false, deleting the resource removes from the port only the groups listed in security_group_ids. If true, deleting the resource removes all security groups from the port. The default value is false.
    port_id string
    Unique identifier of the port. Retrieved from the selectelvpcport_v2 resource. Changing this creates a new port security group association.
    project_id string
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new port security group association.
    region string
    Pool where the port security group association is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port security group association.
    security_group_ids list(string)
    Unique identifiers of the security groups this resource manages on the port. Retrieved from the selectelvpcsecgroup_v2 resource.
    enforce bool
    Specifies if security_group_ids replaces the port's list of security groups or is appended to it. If false, deleting the resource removes from the port only the groups listed in security_group_ids. If true, deleting the resource removes all security groups from the port. The default value is false.
    portId String
    Unique identifier of the port. Retrieved from the selectelvpcport_v2 resource. Changing this creates a new port security group association.
    projectId String
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new port security group association.
    region String
    Pool where the port security group association is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port security group association.
    securityGroupIds List<String>
    Unique identifiers of the security groups this resource manages on the port. Retrieved from the selectelvpcsecgroup_v2 resource.
    enforce Boolean
    Specifies if security_group_ids replaces the port's list of security groups or is appended to it. If false, deleting the resource removes from the port only the groups listed in security_group_ids. If true, deleting the resource removes all security groups from the port. The default value is false.
    portId string
    Unique identifier of the port. Retrieved from the selectelvpcport_v2 resource. Changing this creates a new port security group association.
    projectId string
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new port security group association.
    region string
    Pool where the port security group association is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port security group association.
    securityGroupIds string[]
    Unique identifiers of the security groups this resource manages on the port. Retrieved from the selectelvpcsecgroup_v2 resource.
    enforce boolean
    Specifies if security_group_ids replaces the port's list of security groups or is appended to it. If false, deleting the resource removes from the port only the groups listed in security_group_ids. If true, deleting the resource removes all security groups from the port. The default value is false.
    port_id str
    Unique identifier of the port. Retrieved from the selectelvpcport_v2 resource. Changing this creates a new port security group association.
    project_id str
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new port security group association.
    region str
    Pool where the port security group association is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port security group association.
    security_group_ids Sequence[str]
    Unique identifiers of the security groups this resource manages on the port. Retrieved from the selectelvpcsecgroup_v2 resource.
    enforce bool
    Specifies if security_group_ids replaces the port's list of security groups or is appended to it. If false, deleting the resource removes from the port only the groups listed in security_group_ids. If true, deleting the resource removes all security groups from the port. The default value is false.
    portId String
    Unique identifier of the port. Retrieved from the selectelvpcport_v2 resource. Changing this creates a new port security group association.
    projectId String
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new port security group association.
    region String
    Pool where the port security group association is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port security group association.
    securityGroupIds List<String>
    Unique identifiers of the security groups this resource manages on the port. Retrieved from the selectelvpcsecgroup_v2 resource.
    enforce Boolean
    Specifies if security_group_ids replaces the port's list of security groups or is appended to it. If false, deleting the resource removes from the port only the groups listed in security_group_ids. If true, deleting the resource removes all security groups from the port. The default value is false.

    Outputs

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

    AllSecurityGroupIds List<string>
    All unique identifiers of security groups of the port.
    Id string
    The provider-assigned unique ID for this managed resource.
    AllSecurityGroupIds []string
    All unique identifiers of security groups of the port.
    Id string
    The provider-assigned unique ID for this managed resource.
    all_security_group_ids list(string)
    All unique identifiers of security groups of the port.
    id string
    The provider-assigned unique ID for this managed resource.
    allSecurityGroupIds List<String>
    All unique identifiers of security groups of the port.
    id String
    The provider-assigned unique ID for this managed resource.
    allSecurityGroupIds string[]
    All unique identifiers of security groups of the port.
    id string
    The provider-assigned unique ID for this managed resource.
    all_security_group_ids Sequence[str]
    All unique identifiers of security groups of the port.
    id str
    The provider-assigned unique ID for this managed resource.
    allSecurityGroupIds List<String>
    All unique identifiers of security groups of the port.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing VpcPortSecgroupAssociateV2 Resource

    Get an existing VpcPortSecgroupAssociateV2 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>, state?: VpcPortSecgroupAssociateV2State, opts?: CustomResourceOptions): VpcPortSecgroupAssociateV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            all_security_group_ids: Optional[Sequence[str]] = None,
            enforce: Optional[bool] = None,
            port_id: Optional[str] = None,
            project_id: Optional[str] = None,
            region: Optional[str] = None,
            security_group_ids: Optional[Sequence[str]] = None) -> VpcPortSecgroupAssociateV2
    func GetVpcPortSecgroupAssociateV2(ctx *Context, name string, id IDInput, state *VpcPortSecgroupAssociateV2State, opts ...ResourceOption) (*VpcPortSecgroupAssociateV2, error)
    public static VpcPortSecgroupAssociateV2 Get(string name, Input<string> id, VpcPortSecgroupAssociateV2State? state, CustomResourceOptions? opts = null)
    public static VpcPortSecgroupAssociateV2 get(String name, Output<String> id, VpcPortSecgroupAssociateV2State state, CustomResourceOptions options)
    resources:  _:    type: selectel:VpcPortSecgroupAssociateV2    get:      id: ${id}
    import {
      to = selectel_vpc_port_secgroup_associate_v2.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AllSecurityGroupIds List<string>
    All unique identifiers of security groups of the port.
    Enforce bool
    Specifies if security_group_ids replaces the port's list of security groups or is appended to it. If false, deleting the resource removes from the port only the groups listed in security_group_ids. If true, deleting the resource removes all security groups from the port. The default value is false.
    PortId string
    Unique identifier of the port. Retrieved from the selectelvpcport_v2 resource. Changing this creates a new port security group association.
    ProjectId string
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new port security group association.
    Region string
    Pool where the port security group association is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port security group association.
    SecurityGroupIds List<string>
    Unique identifiers of the security groups this resource manages on the port. Retrieved from the selectelvpcsecgroup_v2 resource.
    AllSecurityGroupIds []string
    All unique identifiers of security groups of the port.
    Enforce bool
    Specifies if security_group_ids replaces the port's list of security groups or is appended to it. If false, deleting the resource removes from the port only the groups listed in security_group_ids. If true, deleting the resource removes all security groups from the port. The default value is false.
    PortId string
    Unique identifier of the port. Retrieved from the selectelvpcport_v2 resource. Changing this creates a new port security group association.
    ProjectId string
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new port security group association.
    Region string
    Pool where the port security group association is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port security group association.
    SecurityGroupIds []string
    Unique identifiers of the security groups this resource manages on the port. Retrieved from the selectelvpcsecgroup_v2 resource.
    all_security_group_ids list(string)
    All unique identifiers of security groups of the port.
    enforce bool
    Specifies if security_group_ids replaces the port's list of security groups or is appended to it. If false, deleting the resource removes from the port only the groups listed in security_group_ids. If true, deleting the resource removes all security groups from the port. The default value is false.
    port_id string
    Unique identifier of the port. Retrieved from the selectelvpcport_v2 resource. Changing this creates a new port security group association.
    project_id string
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new port security group association.
    region string
    Pool where the port security group association is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port security group association.
    security_group_ids list(string)
    Unique identifiers of the security groups this resource manages on the port. Retrieved from the selectelvpcsecgroup_v2 resource.
    allSecurityGroupIds List<String>
    All unique identifiers of security groups of the port.
    enforce Boolean
    Specifies if security_group_ids replaces the port's list of security groups or is appended to it. If false, deleting the resource removes from the port only the groups listed in security_group_ids. If true, deleting the resource removes all security groups from the port. The default value is false.
    portId String
    Unique identifier of the port. Retrieved from the selectelvpcport_v2 resource. Changing this creates a new port security group association.
    projectId String
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new port security group association.
    region String
    Pool where the port security group association is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port security group association.
    securityGroupIds List<String>
    Unique identifiers of the security groups this resource manages on the port. Retrieved from the selectelvpcsecgroup_v2 resource.
    allSecurityGroupIds string[]
    All unique identifiers of security groups of the port.
    enforce boolean
    Specifies if security_group_ids replaces the port's list of security groups or is appended to it. If false, deleting the resource removes from the port only the groups listed in security_group_ids. If true, deleting the resource removes all security groups from the port. The default value is false.
    portId string
    Unique identifier of the port. Retrieved from the selectelvpcport_v2 resource. Changing this creates a new port security group association.
    projectId string
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new port security group association.
    region string
    Pool where the port security group association is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port security group association.
    securityGroupIds string[]
    Unique identifiers of the security groups this resource manages on the port. Retrieved from the selectelvpcsecgroup_v2 resource.
    all_security_group_ids Sequence[str]
    All unique identifiers of security groups of the port.
    enforce bool
    Specifies if security_group_ids replaces the port's list of security groups or is appended to it. If false, deleting the resource removes from the port only the groups listed in security_group_ids. If true, deleting the resource removes all security groups from the port. The default value is false.
    port_id str
    Unique identifier of the port. Retrieved from the selectelvpcport_v2 resource. Changing this creates a new port security group association.
    project_id str
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new port security group association.
    region str
    Pool where the port security group association is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port security group association.
    security_group_ids Sequence[str]
    Unique identifiers of the security groups this resource manages on the port. Retrieved from the selectelvpcsecgroup_v2 resource.
    allSecurityGroupIds List<String>
    All unique identifiers of security groups of the port.
    enforce Boolean
    Specifies if security_group_ids replaces the port's list of security groups or is appended to it. If false, deleting the resource removes from the port only the groups listed in security_group_ids. If true, deleting the resource removes all security groups from the port. The default value is false.
    portId String
    Unique identifier of the port. Retrieved from the selectelvpcport_v2 resource. Changing this creates a new port security group association.
    projectId String
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects. Changing this creates a new port security group association.
    region String
    Pool where the port security group association is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port security group association.
    securityGroupIds List<String>
    Unique identifiers of the security groups this resource manages on the port. Retrieved from the selectelvpcsecgroup_v2 resource.

    Import

    All versions

    Use the pulumi import command:

    export OS_DOMAIN_NAME=<domain_name>

    export OS_USERNAME=

    export OS_PASSWORD=

    export INFRA_PROJECT_ID=<project_id>

    export INFRA_REGION=

    $ pulumi import selectel:index/vpcPortSecgroupAssociateV2:VpcPortSecgroupAssociateV2 associate_1 <id>
    

    <domain_name>, <username>, and <password> are the arguments of the provider configuration.

    Other identity attributes are described above in the import or resource sections.

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    selectel selectel/terraform-provider-selectel
    License
    Notes
    This Pulumi package is based on the selectel Terraform Provider.
    selectel
    Viewing docs for selectel 9.5.0
    published on Friday, Oct 30, 2026 by selectel

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial