1. Registry
  2. Packages
  3. Selectel Provider
  4. API Docs
  5. VpcPortForwardingV2
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 port-forwarding rule of a public floating IP address using the v2 public API. For more information about public floating IP addresses, see the official Selectel documentation.

    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

    import * as pulumi from "@pulumi/pulumi";
    import * as selectel from "@pulumi/selectel";
    
    const portForwarding1 = new selectel.VpcPortForwardingV2("port_forwarding_1", {
        projectId: project1.id,
        region: "ru-6",
        floatingipId: floatingip1.id,
        internalPortId: port1.id,
        internalIpAddress: "192.168.199.50",
        internalPort: 80,
        externalPort: 8080,
        protocol: "tcp",
    });
    
    import pulumi
    import pulumi_selectel as selectel
    
    port_forwarding1 = selectel.VpcPortForwardingV2("port_forwarding_1",
        project_id=project1["id"],
        region="ru-6",
        floatingip_id=floatingip1["id"],
        internal_port_id=port1["id"],
        internal_ip_address="192.168.199.50",
        internal_port=80,
        external_port=8080,
        protocol="tcp")
    
    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.NewVpcPortForwardingV2(ctx, "port_forwarding_1", &selectel.VpcPortForwardingV2Args{
    			ProjectId:         pulumi.Any(project1.Id),
    			Region:            pulumi.String("ru-6"),
    			FloatingipId:      pulumi.Any(floatingip1.Id),
    			InternalPortId:    pulumi.Any(port1.Id),
    			InternalIpAddress: pulumi.String("192.168.199.50"),
    			InternalPort:      pulumi.Float64(80),
    			ExternalPort:      pulumi.Float64(8080),
    			Protocol:          pulumi.String("tcp"),
    		})
    		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 portForwarding1 = new Selectel.VpcPortForwardingV2("port_forwarding_1", new()
        {
            ProjectId = project1.Id,
            Region = "ru-6",
            FloatingipId = floatingip1.Id,
            InternalPortId = port1.Id,
            InternalIpAddress = "192.168.199.50",
            InternalPort = 80,
            ExternalPort = 8080,
            Protocol = "tcp",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.selectel.VpcPortForwardingV2;
    import com.pulumi.selectel.VpcPortForwardingV2Args;
    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 portForwarding1 = new VpcPortForwardingV2("portForwarding1", VpcPortForwardingV2Args.builder()
                .projectId(project1.id())
                .region("ru-6")
                .floatingipId(floatingip1.id())
                .internalPortId(port1.id())
                .internalIpAddress("192.168.199.50")
                .internalPort(80.0)
                .externalPort(8080.0)
                .protocol("tcp")
                .build());
    
        }
    }
    
    resources:
      portForwarding1:
        type: selectel:VpcPortForwardingV2
        name: port_forwarding_1
        properties:
          projectId: ${project1.id}
          region: ru-6
          floatingipId: ${floatingip1.id}
          internalPortId: ${port1.id}
          internalIpAddress: 192.168.199.50
          internalPort: 80
          externalPort: 8080
          protocol: tcp
    
    Example coming soon!
    

    Create VpcPortForwardingV2 Resource

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

    Constructor syntax

    new VpcPortForwardingV2(name: string, args: VpcPortForwardingV2Args, opts?: CustomResourceOptions);
    @overload
    def VpcPortForwardingV2(resource_name: str,
                            args: VpcPortForwardingV2Args,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def VpcPortForwardingV2(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            floatingip_id: Optional[str] = None,
                            internal_ip_address: Optional[str] = None,
                            internal_port_id: Optional[str] = None,
                            project_id: Optional[str] = None,
                            protocol: Optional[str] = None,
                            region: Optional[str] = None,
                            description: Optional[str] = None,
                            external_port: Optional[float] = None,
                            external_port_range: Optional[str] = None,
                            internal_port: Optional[float] = None,
                            internal_port_range: Optional[str] = None,
                            timeouts: Optional[VpcPortForwardingV2TimeoutsArgs] = None)
    func NewVpcPortForwardingV2(ctx *Context, name string, args VpcPortForwardingV2Args, opts ...ResourceOption) (*VpcPortForwardingV2, error)
    public VpcPortForwardingV2(string name, VpcPortForwardingV2Args args, CustomResourceOptions? opts = null)
    public VpcPortForwardingV2(String name, VpcPortForwardingV2Args args)
    public VpcPortForwardingV2(String name, VpcPortForwardingV2Args args, CustomResourceOptions options)
    
    type: selectel:VpcPortForwardingV2
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "selectel_vpc_port_forwarding_v2" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args VpcPortForwardingV2Args
    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 VpcPortForwardingV2Args
    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 VpcPortForwardingV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpcPortForwardingV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpcPortForwardingV2Args
    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 vpcPortForwardingV2Resource = new Selectel.VpcPortForwardingV2("vpcPortForwardingV2Resource", new()
    {
        FloatingipId = "string",
        InternalIpAddress = "string",
        InternalPortId = "string",
        ProjectId = "string",
        Protocol = "string",
        Region = "string",
        Description = "string",
        ExternalPort = 0.0,
        ExternalPortRange = "string",
        InternalPort = 0.0,
        InternalPortRange = "string",
        Timeouts = new Selectel.Inputs.VpcPortForwardingV2TimeoutsArgs
        {
            Create = "string",
        },
    });
    
    example, err := selectel.NewVpcPortForwardingV2(ctx, "vpcPortForwardingV2Resource", &selectel.VpcPortForwardingV2Args{
    	FloatingipId:      pulumi.String("string"),
    	InternalIpAddress: pulumi.String("string"),
    	InternalPortId:    pulumi.String("string"),
    	ProjectId:         pulumi.String("string"),
    	Protocol:          pulumi.String("string"),
    	Region:            pulumi.String("string"),
    	Description:       pulumi.String("string"),
    	ExternalPort:      pulumi.Float64(0),
    	ExternalPortRange: pulumi.String("string"),
    	InternalPort:      pulumi.Float64(0),
    	InternalPortRange: pulumi.String("string"),
    	Timeouts: &selectel.VpcPortForwardingV2TimeoutsArgs{
    		Create: pulumi.String("string"),
    	},
    })
    
    resource "selectel_vpc_port_forwarding_v2" "vpcPortForwardingV2Resource" {
      lifecycle {
        create_before_destroy = true
      }
      floatingip_id       = "string"
      internal_ip_address = "string"
      internal_port_id    = "string"
      project_id          = "string"
      protocol            = "string"
      region              = "string"
      description         = "string"
      external_port       = 0
      external_port_range = "string"
      internal_port       = 0
      internal_port_range = "string"
      timeouts = {
        create = "string"
      }
    }
    
    var vpcPortForwardingV2Resource = new VpcPortForwardingV2("vpcPortForwardingV2Resource", VpcPortForwardingV2Args.builder()
        .floatingipId("string")
        .internalIpAddress("string")
        .internalPortId("string")
        .projectId("string")
        .protocol("string")
        .region("string")
        .description("string")
        .externalPort(0.0)
        .externalPortRange("string")
        .internalPort(0.0)
        .internalPortRange("string")
        .timeouts(VpcPortForwardingV2TimeoutsArgs.builder()
            .create("string")
            .build())
        .build());
    
    vpc_port_forwarding_v2_resource = selectel.VpcPortForwardingV2("vpcPortForwardingV2Resource",
        floatingip_id="string",
        internal_ip_address="string",
        internal_port_id="string",
        project_id="string",
        protocol="string",
        region="string",
        description="string",
        external_port=float(0),
        external_port_range="string",
        internal_port=float(0),
        internal_port_range="string",
        timeouts={
            "create": "string",
        })
    
    const vpcPortForwardingV2Resource = new selectel.VpcPortForwardingV2("vpcPortForwardingV2Resource", {
        floatingipId: "string",
        internalIpAddress: "string",
        internalPortId: "string",
        projectId: "string",
        protocol: "string",
        region: "string",
        description: "string",
        externalPort: 0,
        externalPortRange: "string",
        internalPort: 0,
        internalPortRange: "string",
        timeouts: {
            create: "string",
        },
    });
    
    type: selectel:VpcPortForwardingV2
    properties:
        description: string
        externalPort: 0
        externalPortRange: string
        floatingipId: string
        internalIpAddress: string
        internalPort: 0
        internalPortId: string
        internalPortRange: string
        projectId: string
        protocol: string
        region: string
        timeouts:
            create: string
    

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

    FloatingipId string
    Unique identifier of the public floating IP address the rule belongs to. Retrieved from the selectelvpcfloatingip_v2 resource. Changing this creates a new port forwarding rule.
    InternalIpAddress string
    IPv4 address to which traffic is forwarded. Must be one of the fixed IPs of the internal port internal_port_id.
    InternalPortId string
    Unique identifier of the port traffic is forwarded to. Retrieved from the selectelvpcport_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 port forwarding rule.
    Protocol string
    Protocol of the forwarded traffic. Available values are tcp, udp, icmp, ipv6-icmp, sctp, and dccp.
    Region string
    Pool where the port forwarding rule is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port forwarding rule.
    Description string
    Description of the rule.
    ExternalPort double
    Port traffic arrives at. The available range is from 1 to 65535. Specify either external_port or external_port_range.
    ExternalPortRange string
    Range of ports traffic arrives at, for example, 9000:9002. Must have the same size as internal_port_range. If internal_port is specified instead, every port of the range is forwarded to it. The available range is from 1 to 65535. Specify either external_port_range or external_port.
    InternalPort double
    Port traffic is forwarded to. The available range is from 1 to 65535. Specify either internal_port or internal_port_range.
    InternalPortRange string
    Range of ports traffic is forwarded to, for example, 8000:8002. Must have the same size as external_port_range. To forward every port of external_port_range to one internal port, specify internal_port instead. The available range is from 1 to 65535. Specify either internal_port_range or internal_port.
    Timeouts VpcPortForwardingV2Timeouts
    FloatingipId string
    Unique identifier of the public floating IP address the rule belongs to. Retrieved from the selectelvpcfloatingip_v2 resource. Changing this creates a new port forwarding rule.
    InternalIpAddress string
    IPv4 address to which traffic is forwarded. Must be one of the fixed IPs of the internal port internal_port_id.
    InternalPortId string
    Unique identifier of the port traffic is forwarded to. Retrieved from the selectelvpcport_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 port forwarding rule.
    Protocol string
    Protocol of the forwarded traffic. Available values are tcp, udp, icmp, ipv6-icmp, sctp, and dccp.
    Region string
    Pool where the port forwarding rule is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port forwarding rule.
    Description string
    Description of the rule.
    ExternalPort float64
    Port traffic arrives at. The available range is from 1 to 65535. Specify either external_port or external_port_range.
    ExternalPortRange string
    Range of ports traffic arrives at, for example, 9000:9002. Must have the same size as internal_port_range. If internal_port is specified instead, every port of the range is forwarded to it. The available range is from 1 to 65535. Specify either external_port_range or external_port.
    InternalPort float64
    Port traffic is forwarded to. The available range is from 1 to 65535. Specify either internal_port or internal_port_range.
    InternalPortRange string
    Range of ports traffic is forwarded to, for example, 8000:8002. Must have the same size as external_port_range. To forward every port of external_port_range to one internal port, specify internal_port instead. The available range is from 1 to 65535. Specify either internal_port_range or internal_port.
    Timeouts VpcPortForwardingV2TimeoutsArgs
    floatingip_id string
    Unique identifier of the public floating IP address the rule belongs to. Retrieved from the selectelvpcfloatingip_v2 resource. Changing this creates a new port forwarding rule.
    internal_ip_address string
    IPv4 address to which traffic is forwarded. Must be one of the fixed IPs of the internal port internal_port_id.
    internal_port_id string
    Unique identifier of the port traffic is forwarded to. Retrieved from the selectelvpcport_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 port forwarding rule.
    protocol string
    Protocol of the forwarded traffic. Available values are tcp, udp, icmp, ipv6-icmp, sctp, and dccp.
    region string
    Pool where the port forwarding rule is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port forwarding rule.
    description string
    Description of the rule.
    external_port number
    Port traffic arrives at. The available range is from 1 to 65535. Specify either external_port or external_port_range.
    external_port_range string
    Range of ports traffic arrives at, for example, 9000:9002. Must have the same size as internal_port_range. If internal_port is specified instead, every port of the range is forwarded to it. The available range is from 1 to 65535. Specify either external_port_range or external_port.
    internal_port number
    Port traffic is forwarded to. The available range is from 1 to 65535. Specify either internal_port or internal_port_range.
    internal_port_range string
    Range of ports traffic is forwarded to, for example, 8000:8002. Must have the same size as external_port_range. To forward every port of external_port_range to one internal port, specify internal_port instead. The available range is from 1 to 65535. Specify either internal_port_range or internal_port.
    timeouts object
    floatingipId String
    Unique identifier of the public floating IP address the rule belongs to. Retrieved from the selectelvpcfloatingip_v2 resource. Changing this creates a new port forwarding rule.
    internalIpAddress String
    IPv4 address to which traffic is forwarded. Must be one of the fixed IPs of the internal port internal_port_id.
    internalPortId String
    Unique identifier of the port traffic is forwarded to. Retrieved from the selectelvpcport_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 port forwarding rule.
    protocol String
    Protocol of the forwarded traffic. Available values are tcp, udp, icmp, ipv6-icmp, sctp, and dccp.
    region String
    Pool where the port forwarding rule is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port forwarding rule.
    description String
    Description of the rule.
    externalPort Double
    Port traffic arrives at. The available range is from 1 to 65535. Specify either external_port or external_port_range.
    externalPortRange String
    Range of ports traffic arrives at, for example, 9000:9002. Must have the same size as internal_port_range. If internal_port is specified instead, every port of the range is forwarded to it. The available range is from 1 to 65535. Specify either external_port_range or external_port.
    internalPort Double
    Port traffic is forwarded to. The available range is from 1 to 65535. Specify either internal_port or internal_port_range.
    internalPortRange String
    Range of ports traffic is forwarded to, for example, 8000:8002. Must have the same size as external_port_range. To forward every port of external_port_range to one internal port, specify internal_port instead. The available range is from 1 to 65535. Specify either internal_port_range or internal_port.
    timeouts VpcPortForwardingV2Timeouts
    floatingipId string
    Unique identifier of the public floating IP address the rule belongs to. Retrieved from the selectelvpcfloatingip_v2 resource. Changing this creates a new port forwarding rule.
    internalIpAddress string
    IPv4 address to which traffic is forwarded. Must be one of the fixed IPs of the internal port internal_port_id.
    internalPortId string
    Unique identifier of the port traffic is forwarded to. Retrieved from the selectelvpcport_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 port forwarding rule.
    protocol string
    Protocol of the forwarded traffic. Available values are tcp, udp, icmp, ipv6-icmp, sctp, and dccp.
    region string
    Pool where the port forwarding rule is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port forwarding rule.
    description string
    Description of the rule.
    externalPort number
    Port traffic arrives at. The available range is from 1 to 65535. Specify either external_port or external_port_range.
    externalPortRange string
    Range of ports traffic arrives at, for example, 9000:9002. Must have the same size as internal_port_range. If internal_port is specified instead, every port of the range is forwarded to it. The available range is from 1 to 65535. Specify either external_port_range or external_port.
    internalPort number
    Port traffic is forwarded to. The available range is from 1 to 65535. Specify either internal_port or internal_port_range.
    internalPortRange string
    Range of ports traffic is forwarded to, for example, 8000:8002. Must have the same size as external_port_range. To forward every port of external_port_range to one internal port, specify internal_port instead. The available range is from 1 to 65535. Specify either internal_port_range or internal_port.
    timeouts VpcPortForwardingV2Timeouts
    floatingip_id str
    Unique identifier of the public floating IP address the rule belongs to. Retrieved from the selectelvpcfloatingip_v2 resource. Changing this creates a new port forwarding rule.
    internal_ip_address str
    IPv4 address to which traffic is forwarded. Must be one of the fixed IPs of the internal port internal_port_id.
    internal_port_id str
    Unique identifier of the port traffic is forwarded to. Retrieved from the selectelvpcport_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 port forwarding rule.
    protocol str
    Protocol of the forwarded traffic. Available values are tcp, udp, icmp, ipv6-icmp, sctp, and dccp.
    region str
    Pool where the port forwarding rule is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port forwarding rule.
    description str
    Description of the rule.
    external_port float
    Port traffic arrives at. The available range is from 1 to 65535. Specify either external_port or external_port_range.
    external_port_range str
    Range of ports traffic arrives at, for example, 9000:9002. Must have the same size as internal_port_range. If internal_port is specified instead, every port of the range is forwarded to it. The available range is from 1 to 65535. Specify either external_port_range or external_port.
    internal_port float
    Port traffic is forwarded to. The available range is from 1 to 65535. Specify either internal_port or internal_port_range.
    internal_port_range str
    Range of ports traffic is forwarded to, for example, 8000:8002. Must have the same size as external_port_range. To forward every port of external_port_range to one internal port, specify internal_port instead. The available range is from 1 to 65535. Specify either internal_port_range or internal_port.
    timeouts VpcPortForwardingV2TimeoutsArgs
    floatingipId String
    Unique identifier of the public floating IP address the rule belongs to. Retrieved from the selectelvpcfloatingip_v2 resource. Changing this creates a new port forwarding rule.
    internalIpAddress String
    IPv4 address to which traffic is forwarded. Must be one of the fixed IPs of the internal port internal_port_id.
    internalPortId String
    Unique identifier of the port traffic is forwarded to. Retrieved from the selectelvpcport_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 port forwarding rule.
    protocol String
    Protocol of the forwarded traffic. Available values are tcp, udp, icmp, ipv6-icmp, sctp, and dccp.
    region String
    Pool where the port forwarding rule is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port forwarding rule.
    description String
    Description of the rule.
    externalPort Number
    Port traffic arrives at. The available range is from 1 to 65535. Specify either external_port or external_port_range.
    externalPortRange String
    Range of ports traffic arrives at, for example, 9000:9002. Must have the same size as internal_port_range. If internal_port is specified instead, every port of the range is forwarded to it. The available range is from 1 to 65535. Specify either external_port_range or external_port.
    internalPort Number
    Port traffic is forwarded to. The available range is from 1 to 65535. Specify either internal_port or internal_port_range.
    internalPortRange String
    Range of ports traffic is forwarded to, for example, 8000:8002. Must have the same size as external_port_range. To forward every port of external_port_range to one internal port, specify internal_port instead. The available range is from 1 to 65535. Specify either internal_port_range or internal_port.
    timeouts Property Map

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing VpcPortForwardingV2 Resource

    Get an existing VpcPortForwardingV2 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?: VpcPortForwardingV2State, opts?: CustomResourceOptions): VpcPortForwardingV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            external_port: Optional[float] = None,
            external_port_range: Optional[str] = None,
            floatingip_id: Optional[str] = None,
            internal_ip_address: Optional[str] = None,
            internal_port: Optional[float] = None,
            internal_port_id: Optional[str] = None,
            internal_port_range: Optional[str] = None,
            project_id: Optional[str] = None,
            protocol: Optional[str] = None,
            region: Optional[str] = None,
            timeouts: Optional[VpcPortForwardingV2TimeoutsArgs] = None) -> VpcPortForwardingV2
    func GetVpcPortForwardingV2(ctx *Context, name string, id IDInput, state *VpcPortForwardingV2State, opts ...ResourceOption) (*VpcPortForwardingV2, error)
    public static VpcPortForwardingV2 Get(string name, Input<string> id, VpcPortForwardingV2State? state, CustomResourceOptions? opts = null)
    public static VpcPortForwardingV2 get(String name, Output<String> id, VpcPortForwardingV2State state, CustomResourceOptions options)
    resources:  _:    type: selectel:VpcPortForwardingV2    get:      id: ${id}
    import {
      to = selectel_vpc_port_forwarding_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:
    Description string
    Description of the rule.
    ExternalPort double
    Port traffic arrives at. The available range is from 1 to 65535. Specify either external_port or external_port_range.
    ExternalPortRange string
    Range of ports traffic arrives at, for example, 9000:9002. Must have the same size as internal_port_range. If internal_port is specified instead, every port of the range is forwarded to it. The available range is from 1 to 65535. Specify either external_port_range or external_port.
    FloatingipId string
    Unique identifier of the public floating IP address the rule belongs to. Retrieved from the selectelvpcfloatingip_v2 resource. Changing this creates a new port forwarding rule.
    InternalIpAddress string
    IPv4 address to which traffic is forwarded. Must be one of the fixed IPs of the internal port internal_port_id.
    InternalPort double
    Port traffic is forwarded to. The available range is from 1 to 65535. Specify either internal_port or internal_port_range.
    InternalPortId string
    Unique identifier of the port traffic is forwarded to. Retrieved from the selectelvpcport_v2 resource.
    InternalPortRange string
    Range of ports traffic is forwarded to, for example, 8000:8002. Must have the same size as external_port_range. To forward every port of external_port_range to one internal port, specify internal_port instead. The available range is from 1 to 65535. Specify either internal_port_range or internal_port.
    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 forwarding rule.
    Protocol string
    Protocol of the forwarded traffic. Available values are tcp, udp, icmp, ipv6-icmp, sctp, and dccp.
    Region string
    Pool where the port forwarding rule is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port forwarding rule.
    Timeouts VpcPortForwardingV2Timeouts
    Description string
    Description of the rule.
    ExternalPort float64
    Port traffic arrives at. The available range is from 1 to 65535. Specify either external_port or external_port_range.
    ExternalPortRange string
    Range of ports traffic arrives at, for example, 9000:9002. Must have the same size as internal_port_range. If internal_port is specified instead, every port of the range is forwarded to it. The available range is from 1 to 65535. Specify either external_port_range or external_port.
    FloatingipId string
    Unique identifier of the public floating IP address the rule belongs to. Retrieved from the selectelvpcfloatingip_v2 resource. Changing this creates a new port forwarding rule.
    InternalIpAddress string
    IPv4 address to which traffic is forwarded. Must be one of the fixed IPs of the internal port internal_port_id.
    InternalPort float64
    Port traffic is forwarded to. The available range is from 1 to 65535. Specify either internal_port or internal_port_range.
    InternalPortId string
    Unique identifier of the port traffic is forwarded to. Retrieved from the selectelvpcport_v2 resource.
    InternalPortRange string
    Range of ports traffic is forwarded to, for example, 8000:8002. Must have the same size as external_port_range. To forward every port of external_port_range to one internal port, specify internal_port instead. The available range is from 1 to 65535. Specify either internal_port_range or internal_port.
    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 forwarding rule.
    Protocol string
    Protocol of the forwarded traffic. Available values are tcp, udp, icmp, ipv6-icmp, sctp, and dccp.
    Region string
    Pool where the port forwarding rule is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port forwarding rule.
    Timeouts VpcPortForwardingV2TimeoutsArgs
    description string
    Description of the rule.
    external_port number
    Port traffic arrives at. The available range is from 1 to 65535. Specify either external_port or external_port_range.
    external_port_range string
    Range of ports traffic arrives at, for example, 9000:9002. Must have the same size as internal_port_range. If internal_port is specified instead, every port of the range is forwarded to it. The available range is from 1 to 65535. Specify either external_port_range or external_port.
    floatingip_id string
    Unique identifier of the public floating IP address the rule belongs to. Retrieved from the selectelvpcfloatingip_v2 resource. Changing this creates a new port forwarding rule.
    internal_ip_address string
    IPv4 address to which traffic is forwarded. Must be one of the fixed IPs of the internal port internal_port_id.
    internal_port number
    Port traffic is forwarded to. The available range is from 1 to 65535. Specify either internal_port or internal_port_range.
    internal_port_id string
    Unique identifier of the port traffic is forwarded to. Retrieved from the selectelvpcport_v2 resource.
    internal_port_range string
    Range of ports traffic is forwarded to, for example, 8000:8002. Must have the same size as external_port_range. To forward every port of external_port_range to one internal port, specify internal_port instead. The available range is from 1 to 65535. Specify either internal_port_range or internal_port.
    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 forwarding rule.
    protocol string
    Protocol of the forwarded traffic. Available values are tcp, udp, icmp, ipv6-icmp, sctp, and dccp.
    region string
    Pool where the port forwarding rule is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port forwarding rule.
    timeouts object
    description String
    Description of the rule.
    externalPort Double
    Port traffic arrives at. The available range is from 1 to 65535. Specify either external_port or external_port_range.
    externalPortRange String
    Range of ports traffic arrives at, for example, 9000:9002. Must have the same size as internal_port_range. If internal_port is specified instead, every port of the range is forwarded to it. The available range is from 1 to 65535. Specify either external_port_range or external_port.
    floatingipId String
    Unique identifier of the public floating IP address the rule belongs to. Retrieved from the selectelvpcfloatingip_v2 resource. Changing this creates a new port forwarding rule.
    internalIpAddress String
    IPv4 address to which traffic is forwarded. Must be one of the fixed IPs of the internal port internal_port_id.
    internalPort Double
    Port traffic is forwarded to. The available range is from 1 to 65535. Specify either internal_port or internal_port_range.
    internalPortId String
    Unique identifier of the port traffic is forwarded to. Retrieved from the selectelvpcport_v2 resource.
    internalPortRange String
    Range of ports traffic is forwarded to, for example, 8000:8002. Must have the same size as external_port_range. To forward every port of external_port_range to one internal port, specify internal_port instead. The available range is from 1 to 65535. Specify either internal_port_range or internal_port.
    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 forwarding rule.
    protocol String
    Protocol of the forwarded traffic. Available values are tcp, udp, icmp, ipv6-icmp, sctp, and dccp.
    region String
    Pool where the port forwarding rule is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port forwarding rule.
    timeouts VpcPortForwardingV2Timeouts
    description string
    Description of the rule.
    externalPort number
    Port traffic arrives at. The available range is from 1 to 65535. Specify either external_port or external_port_range.
    externalPortRange string
    Range of ports traffic arrives at, for example, 9000:9002. Must have the same size as internal_port_range. If internal_port is specified instead, every port of the range is forwarded to it. The available range is from 1 to 65535. Specify either external_port_range or external_port.
    floatingipId string
    Unique identifier of the public floating IP address the rule belongs to. Retrieved from the selectelvpcfloatingip_v2 resource. Changing this creates a new port forwarding rule.
    internalIpAddress string
    IPv4 address to which traffic is forwarded. Must be one of the fixed IPs of the internal port internal_port_id.
    internalPort number
    Port traffic is forwarded to. The available range is from 1 to 65535. Specify either internal_port or internal_port_range.
    internalPortId string
    Unique identifier of the port traffic is forwarded to. Retrieved from the selectelvpcport_v2 resource.
    internalPortRange string
    Range of ports traffic is forwarded to, for example, 8000:8002. Must have the same size as external_port_range. To forward every port of external_port_range to one internal port, specify internal_port instead. The available range is from 1 to 65535. Specify either internal_port_range or internal_port.
    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 forwarding rule.
    protocol string
    Protocol of the forwarded traffic. Available values are tcp, udp, icmp, ipv6-icmp, sctp, and dccp.
    region string
    Pool where the port forwarding rule is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port forwarding rule.
    timeouts VpcPortForwardingV2Timeouts
    description str
    Description of the rule.
    external_port float
    Port traffic arrives at. The available range is from 1 to 65535. Specify either external_port or external_port_range.
    external_port_range str
    Range of ports traffic arrives at, for example, 9000:9002. Must have the same size as internal_port_range. If internal_port is specified instead, every port of the range is forwarded to it. The available range is from 1 to 65535. Specify either external_port_range or external_port.
    floatingip_id str
    Unique identifier of the public floating IP address the rule belongs to. Retrieved from the selectelvpcfloatingip_v2 resource. Changing this creates a new port forwarding rule.
    internal_ip_address str
    IPv4 address to which traffic is forwarded. Must be one of the fixed IPs of the internal port internal_port_id.
    internal_port float
    Port traffic is forwarded to. The available range is from 1 to 65535. Specify either internal_port or internal_port_range.
    internal_port_id str
    Unique identifier of the port traffic is forwarded to. Retrieved from the selectelvpcport_v2 resource.
    internal_port_range str
    Range of ports traffic is forwarded to, for example, 8000:8002. Must have the same size as external_port_range. To forward every port of external_port_range to one internal port, specify internal_port instead. The available range is from 1 to 65535. Specify either internal_port_range or internal_port.
    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 forwarding rule.
    protocol str
    Protocol of the forwarded traffic. Available values are tcp, udp, icmp, ipv6-icmp, sctp, and dccp.
    region str
    Pool where the port forwarding rule is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port forwarding rule.
    timeouts VpcPortForwardingV2TimeoutsArgs
    description String
    Description of the rule.
    externalPort Number
    Port traffic arrives at. The available range is from 1 to 65535. Specify either external_port or external_port_range.
    externalPortRange String
    Range of ports traffic arrives at, for example, 9000:9002. Must have the same size as internal_port_range. If internal_port is specified instead, every port of the range is forwarded to it. The available range is from 1 to 65535. Specify either external_port_range or external_port.
    floatingipId String
    Unique identifier of the public floating IP address the rule belongs to. Retrieved from the selectelvpcfloatingip_v2 resource. Changing this creates a new port forwarding rule.
    internalIpAddress String
    IPv4 address to which traffic is forwarded. Must be one of the fixed IPs of the internal port internal_port_id.
    internalPort Number
    Port traffic is forwarded to. The available range is from 1 to 65535. Specify either internal_port or internal_port_range.
    internalPortId String
    Unique identifier of the port traffic is forwarded to. Retrieved from the selectelvpcport_v2 resource.
    internalPortRange String
    Range of ports traffic is forwarded to, for example, 8000:8002. Must have the same size as external_port_range. To forward every port of external_port_range to one internal port, specify internal_port instead. The available range is from 1 to 65535. Specify either internal_port_range or internal_port.
    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 forwarding rule.
    protocol String
    Protocol of the forwarded traffic. Available values are tcp, udp, icmp, ipv6-icmp, sctp, and dccp.
    region String
    Pool where the port forwarding rule is located, for example, ru-6. Learn more about available pools in Product availability by location. Changing this creates a new port forwarding rule.
    timeouts Property Map

    Supporting Types

    VpcPortForwardingV2Timeouts, VpcPortForwardingV2TimeoutsArgs

    Create string
    Create string
    create string
    create String
    create string
    create str
    create String

    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/vpcPortForwardingV2:VpcPortForwardingV2 port_forwarding_1 <floatingip_id>/<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