1. Registry
  2. Packages
  3. Selectel Provider
  4. API Docs
  5. VpcPublicPortV1
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 a direct public IP address (public port) in VPC using the v1 public API. For more information about direct public IP addresses, see the official Selectel documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as selectel from "@pulumi/selectel";
    
    const port1 = new selectel.VpcPublicPortV1("port_1", {
        projectId: project1.id,
        region: "ru-6",
    });
    
    import pulumi
    import pulumi_selectel as selectel
    
    port1 = selectel.VpcPublicPortV1("port_1",
        project_id=project1["id"],
        region="ru-6")
    
    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.NewVpcPublicPortV1(ctx, "port_1", &selectel.VpcPublicPortV1Args{
    			ProjectId: pulumi.Any(project1.Id),
    			Region:    pulumi.String("ru-6"),
    		})
    		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 port1 = new Selectel.VpcPublicPortV1("port_1", new()
        {
            ProjectId = project1.Id,
            Region = "ru-6",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.selectel.VpcPublicPortV1;
    import com.pulumi.selectel.VpcPublicPortV1Args;
    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 port1 = new VpcPublicPortV1("port1", VpcPublicPortV1Args.builder()
                .projectId(project1.id())
                .region("ru-6")
                .build());
    
        }
    }
    
    resources:
      port1:
        type: selectel:VpcPublicPortV1
        name: port_1
        properties:
          projectId: ${project1.id}
          region: ru-6
    
    Example coming soon!
    

    Create VpcPublicPortV1 Resource

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

    Constructor syntax

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

    Parameters

    name string
    The unique name of the resource.
    args VpcPublicPortV1Args
    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 VpcPublicPortV1Args
    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 VpcPublicPortV1Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpcPublicPortV1Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpcPublicPortV1Args
    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 vpcPublicPortV1Resource = new Selectel.VpcPublicPortV1("vpcPublicPortV1Resource", new()
    {
        ProjectId = "string",
        Region = "string",
        AdminStateUp = false,
        Description = "string",
        SecurityGroupIds = new[]
        {
            "string",
        },
    });
    
    example, err := selectel.NewVpcPublicPortV1(ctx, "vpcPublicPortV1Resource", &selectel.VpcPublicPortV1Args{
    	ProjectId:    pulumi.String("string"),
    	Region:       pulumi.String("string"),
    	AdminStateUp: pulumi.Bool(false),
    	Description:  pulumi.String("string"),
    	SecurityGroupIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    resource "selectel_vpc_public_port_v1" "vpcPublicPortV1Resource" {
      lifecycle {
        create_before_destroy = true
      }
      project_id         = "string"
      region             = "string"
      admin_state_up     = false
      description        = "string"
      security_group_ids = ["string"]
    }
    
    var vpcPublicPortV1Resource = new VpcPublicPortV1("vpcPublicPortV1Resource", VpcPublicPortV1Args.builder()
        .projectId("string")
        .region("string")
        .adminStateUp(false)
        .description("string")
        .securityGroupIds("string")
        .build());
    
    vpc_public_port_v1_resource = selectel.VpcPublicPortV1("vpcPublicPortV1Resource",
        project_id="string",
        region="string",
        admin_state_up=False,
        description="string",
        security_group_ids=["string"])
    
    const vpcPublicPortV1Resource = new selectel.VpcPublicPortV1("vpcPublicPortV1Resource", {
        projectId: "string",
        region: "string",
        adminStateUp: false,
        description: "string",
        securityGroupIds: ["string"],
    });
    
    type: selectel:VpcPublicPortV1
    properties:
        adminStateUp: false
        description: string
        projectId: string
        region: string
        securityGroupIds:
            - string
    

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

    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 public port.
    Region string
    Pool where the public port is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new public port.
    AdminStateUp bool
    Specifies if the port is administratively up. The default value is true.
    Description string
    Description of the public port. The default value is an empty string.
    SecurityGroupIds List<string>
    Unique identifiers of security groups associated with the public port. If not specified, the port gets the default security group of the project. Retrieved from the selectelvpcsecgroup_v2 resource.
    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 public port.
    Region string
    Pool where the public port is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new public port.
    AdminStateUp bool
    Specifies if the port is administratively up. The default value is true.
    Description string
    Description of the public port. The default value is an empty string.
    SecurityGroupIds []string
    Unique identifiers of security groups associated with the public port. If not specified, the port gets the default security group of the project. Retrieved from the selectelvpcsecgroup_v2 resource.
    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 public port.
    region string
    Pool where the public port is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new public port.
    admin_state_up bool
    Specifies if the port is administratively up. The default value is true.
    description string
    Description of the public port. The default value is an empty string.
    security_group_ids list(string)
    Unique identifiers of security groups associated with the public port. If not specified, the port gets the default security group of the project. Retrieved from the selectelvpcsecgroup_v2 resource.
    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 public port.
    region String
    Pool where the public port is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new public port.
    adminStateUp Boolean
    Specifies if the port is administratively up. The default value is true.
    description String
    Description of the public port. The default value is an empty string.
    securityGroupIds List<String>
    Unique identifiers of security groups associated with the public port. If not specified, the port gets the default security group of the project. Retrieved from the selectelvpcsecgroup_v2 resource.
    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 public port.
    region string
    Pool where the public port is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new public port.
    adminStateUp boolean
    Specifies if the port is administratively up. The default value is true.
    description string
    Description of the public port. The default value is an empty string.
    securityGroupIds string[]
    Unique identifiers of security groups associated with the public port. If not specified, the port gets the default security group of the project. Retrieved from the selectelvpcsecgroup_v2 resource.
    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 public port.
    region str
    Pool where the public port is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new public port.
    admin_state_up bool
    Specifies if the port is administratively up. The default value is true.
    description str
    Description of the public port. The default value is an empty string.
    security_group_ids Sequence[str]
    Unique identifiers of security groups associated with the public port. If not specified, the port gets the default security group of the project. Retrieved from the selectelvpcsecgroup_v2 resource.
    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 public port.
    region String
    Pool where the public port is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new public port.
    adminStateUp Boolean
    Specifies if the port is administratively up. The default value is true.
    description String
    Description of the public port. The default value is an empty string.
    securityGroupIds List<String>
    Unique identifiers of security groups associated with the public port. If not specified, the port gets the default security group of the project. Retrieved from the selectelvpcsecgroup_v2 resource.

    Outputs

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

    Gateway string
    IP address of the subnet gateway.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpAddress string
    Direct public IP address assigned to the public port.
    NetworkId string
    Unique identifier of the service network from which the public port is allocated.
    Subnet string
    CIDR of the subnet from which the public port IP address is allocated.
    Gateway string
    IP address of the subnet gateway.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpAddress string
    Direct public IP address assigned to the public port.
    NetworkId string
    Unique identifier of the service network from which the public port is allocated.
    Subnet string
    CIDR of the subnet from which the public port IP address is allocated.
    gateway string
    IP address of the subnet gateway.
    id string
    The provider-assigned unique ID for this managed resource.
    ip_address string
    Direct public IP address assigned to the public port.
    network_id string
    Unique identifier of the service network from which the public port is allocated.
    subnet string
    CIDR of the subnet from which the public port IP address is allocated.
    gateway String
    IP address of the subnet gateway.
    id String
    The provider-assigned unique ID for this managed resource.
    ipAddress String
    Direct public IP address assigned to the public port.
    networkId String
    Unique identifier of the service network from which the public port is allocated.
    subnet String
    CIDR of the subnet from which the public port IP address is allocated.
    gateway string
    IP address of the subnet gateway.
    id string
    The provider-assigned unique ID for this managed resource.
    ipAddress string
    Direct public IP address assigned to the public port.
    networkId string
    Unique identifier of the service network from which the public port is allocated.
    subnet string
    CIDR of the subnet from which the public port IP address is allocated.
    gateway str
    IP address of the subnet gateway.
    id str
    The provider-assigned unique ID for this managed resource.
    ip_address str
    Direct public IP address assigned to the public port.
    network_id str
    Unique identifier of the service network from which the public port is allocated.
    subnet str
    CIDR of the subnet from which the public port IP address is allocated.
    gateway String
    IP address of the subnet gateway.
    id String
    The provider-assigned unique ID for this managed resource.
    ipAddress String
    Direct public IP address assigned to the public port.
    networkId String
    Unique identifier of the service network from which the public port is allocated.
    subnet String
    CIDR of the subnet from which the public port IP address is allocated.

    Look up Existing VpcPublicPortV1 Resource

    Get an existing VpcPublicPortV1 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?: VpcPublicPortV1State, opts?: CustomResourceOptions): VpcPublicPortV1
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            admin_state_up: Optional[bool] = None,
            description: Optional[str] = None,
            gateway: Optional[str] = None,
            ip_address: Optional[str] = None,
            network_id: Optional[str] = None,
            project_id: Optional[str] = None,
            region: Optional[str] = None,
            security_group_ids: Optional[Sequence[str]] = None,
            subnet: Optional[str] = None) -> VpcPublicPortV1
    func GetVpcPublicPortV1(ctx *Context, name string, id IDInput, state *VpcPublicPortV1State, opts ...ResourceOption) (*VpcPublicPortV1, error)
    public static VpcPublicPortV1 Get(string name, Input<string> id, VpcPublicPortV1State? state, CustomResourceOptions? opts = null)
    public static VpcPublicPortV1 get(String name, Output<String> id, VpcPublicPortV1State state, CustomResourceOptions options)
    resources:  _:    type: selectel:VpcPublicPortV1    get:      id: ${id}
    import {
      to = selectel_vpc_public_port_v1.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:
    AdminStateUp bool
    Specifies if the port is administratively up. The default value is true.
    Description string
    Description of the public port. The default value is an empty string.
    Gateway string
    IP address of the subnet gateway.
    IpAddress string
    Direct public IP address assigned to the public port.
    NetworkId string
    Unique identifier of the service network from which the public port is allocated.
    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 public port.
    Region string
    Pool where the public port is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new public port.
    SecurityGroupIds List<string>
    Unique identifiers of security groups associated with the public port. If not specified, the port gets the default security group of the project. Retrieved from the selectelvpcsecgroup_v2 resource.
    Subnet string
    CIDR of the subnet from which the public port IP address is allocated.
    AdminStateUp bool
    Specifies if the port is administratively up. The default value is true.
    Description string
    Description of the public port. The default value is an empty string.
    Gateway string
    IP address of the subnet gateway.
    IpAddress string
    Direct public IP address assigned to the public port.
    NetworkId string
    Unique identifier of the service network from which the public port is allocated.
    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 public port.
    Region string
    Pool where the public port is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new public port.
    SecurityGroupIds []string
    Unique identifiers of security groups associated with the public port. If not specified, the port gets the default security group of the project. Retrieved from the selectelvpcsecgroup_v2 resource.
    Subnet string
    CIDR of the subnet from which the public port IP address is allocated.
    admin_state_up bool
    Specifies if the port is administratively up. The default value is true.
    description string
    Description of the public port. The default value is an empty string.
    gateway string
    IP address of the subnet gateway.
    ip_address string
    Direct public IP address assigned to the public port.
    network_id string
    Unique identifier of the service network from which the public port is allocated.
    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 public port.
    region string
    Pool where the public port is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new public port.
    security_group_ids list(string)
    Unique identifiers of security groups associated with the public port. If not specified, the port gets the default security group of the project. Retrieved from the selectelvpcsecgroup_v2 resource.
    subnet string
    CIDR of the subnet from which the public port IP address is allocated.
    adminStateUp Boolean
    Specifies if the port is administratively up. The default value is true.
    description String
    Description of the public port. The default value is an empty string.
    gateway String
    IP address of the subnet gateway.
    ipAddress String
    Direct public IP address assigned to the public port.
    networkId String
    Unique identifier of the service network from which the public port is allocated.
    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 public port.
    region String
    Pool where the public port is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new public port.
    securityGroupIds List<String>
    Unique identifiers of security groups associated with the public port. If not specified, the port gets the default security group of the project. Retrieved from the selectelvpcsecgroup_v2 resource.
    subnet String
    CIDR of the subnet from which the public port IP address is allocated.
    adminStateUp boolean
    Specifies if the port is administratively up. The default value is true.
    description string
    Description of the public port. The default value is an empty string.
    gateway string
    IP address of the subnet gateway.
    ipAddress string
    Direct public IP address assigned to the public port.
    networkId string
    Unique identifier of the service network from which the public port is allocated.
    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 public port.
    region string
    Pool where the public port is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new public port.
    securityGroupIds string[]
    Unique identifiers of security groups associated with the public port. If not specified, the port gets the default security group of the project. Retrieved from the selectelvpcsecgroup_v2 resource.
    subnet string
    CIDR of the subnet from which the public port IP address is allocated.
    admin_state_up bool
    Specifies if the port is administratively up. The default value is true.
    description str
    Description of the public port. The default value is an empty string.
    gateway str
    IP address of the subnet gateway.
    ip_address str
    Direct public IP address assigned to the public port.
    network_id str
    Unique identifier of the service network from which the public port is allocated.
    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 public port.
    region str
    Pool where the public port is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new public port.
    security_group_ids Sequence[str]
    Unique identifiers of security groups associated with the public port. If not specified, the port gets the default security group of the project. Retrieved from the selectelvpcsecgroup_v2 resource.
    subnet str
    CIDR of the subnet from which the public port IP address is allocated.
    adminStateUp Boolean
    Specifies if the port is administratively up. The default value is true.
    description String
    Description of the public port. The default value is an empty string.
    gateway String
    IP address of the subnet gateway.
    ipAddress String
    Direct public IP address assigned to the public port.
    networkId String
    Unique identifier of the service network from which the public port is allocated.
    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 public port.
    region String
    Pool where the public port is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new public port.
    securityGroupIds List<String>
    Unique identifiers of security groups associated with the public port. If not specified, the port gets the default security group of the project. Retrieved from the selectelvpcsecgroup_v2 resource.
    subnet String
    CIDR of the subnet from which the public port IP address is allocated.

    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/vpcPublicPortV1:VpcPublicPortV1 port <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