1. Registry
  2. Packages
  3. Selectel Provider
  4. API Docs
  5. getVpcRouterV2
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

    Provides a cloud router. For more information about cloud routers, 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 router1 = selectel.getVpcRouterV2({
        projectId: project1.id,
        region: "ru-6",
        name: "router-1",
    });
    
    import pulumi
    import pulumi_selectel as selectel
    
    router1 = selectel.get_vpc_router_v2(project_id=project1["id"],
        region="ru-6",
        name="router-1")
    
    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.LookupVpcRouterV2(ctx, &selectel.LookupVpcRouterV2Args{
    			ProjectId: project1.Id,
    			Region:    "ru-6",
    			Name:      pulumi.StringRef("router-1"),
    		}, nil)
    		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 router1 = Selectel.GetVpcRouterV2.Invoke(new()
        {
            ProjectId = project1.Id,
            Region = "ru-6",
            Name = "router-1",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.selectel.SelectelFunctions;
    import com.pulumi.selectel.inputs.GetVpcRouterV2Args;
    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) {
            final var router1 = SelectelFunctions.getVpcRouterV2(GetVpcRouterV2Args.builder()
                .projectId(project1.id())
                .region("ru-6")
                .name("router-1")
                .build());
    
        }
    }
    
    variables:
      router1:
        fn::invoke:
          function: selectel:getVpcRouterV2
          arguments:
            projectId: ${project1.id}
            region: ru-6
            name: router-1
    
    Example coming soon!
    

    Using getVpcRouterV2

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getVpcRouterV2(args: GetVpcRouterV2Args, opts?: InvokeOptions): Promise<GetVpcRouterV2Result>
    function getVpcRouterV2Output(args: GetVpcRouterV2OutputArgs, opts?: InvokeOutputOptions): Output<GetVpcRouterV2Result>
    def get_vpc_router_v2(admin_state_up: Optional[bool] = None,
                          description: Optional[str] = None,
                          name: Optional[str] = None,
                          project_id: Optional[str] = None,
                          region: Optional[str] = None,
                          router_id: Optional[str] = None,
                          tags: Optional[Sequence[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> GetVpcRouterV2Result
    def get_vpc_router_v2_output(admin_state_up: pulumi.Input[Optional[bool]] = None,
                          description: pulumi.Input[Optional[str]] = None,
                          name: pulumi.Input[Optional[str]] = None,
                          project_id: pulumi.Input[Optional[str]] = None,
                          region: pulumi.Input[Optional[str]] = None,
                          router_id: pulumi.Input[Optional[str]] = None,
                          tags: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
                          opts: Optional[InvokeOutputOptions] = None) -> Output[GetVpcRouterV2Result]
    func LookupVpcRouterV2(ctx *Context, args *LookupVpcRouterV2Args, opts ...InvokeOption) (*LookupVpcRouterV2Result, error)
    func LookupVpcRouterV2Output(ctx *Context, args *LookupVpcRouterV2OutputArgs, opts ...InvokeOption) LookupVpcRouterV2ResultOutput

    > Note: This function is named LookupVpcRouterV2 in the Go SDK.

    public static class GetVpcRouterV2 
    {
        public static Task<GetVpcRouterV2Result> InvokeAsync(GetVpcRouterV2Args args, InvokeOptions? opts = null)
        public static Output<GetVpcRouterV2Result> Invoke(GetVpcRouterV2InvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetVpcRouterV2Result> Invoke(GetVpcRouterV2InvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetVpcRouterV2Result> getVpcRouterV2(GetVpcRouterV2Args args, InvokeOptions options)
    public static Output<GetVpcRouterV2Result> getVpcRouterV2(GetVpcRouterV2Args args, InvokeOptions options)
    public static Output<GetVpcRouterV2Result> getVpcRouterV2(GetVpcRouterV2Args args, InvokeOutputOptions options)
    
    fn::invoke:
      function: selectel:index/getVpcRouterV2:getVpcRouterV2
      arguments:
        # arguments dictionary
    data "selectel_get_vpc_router_v2" "name" {
        # arguments
    }

    The following arguments are supported:

    ProjectId string
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects.
    Region string
    Pool where the router is located, for example, ru-6. Learn more about available pools in Product availability by location.
    AdminStateUp bool
    Specifies if the router is administratively up.
    Description string
    Description of the router.
    Name string
    Name of the router.
    RouterId string
    Unique identifier of the router. To get the router ID, in the Control panel, go to Products ⟶ Cloud Servers ⟶ Network ⟶ the Cloud routers tab ⟶ copy the ID in the card of the required router.
    Tags List<string>
    Tags of the router.
    ProjectId string
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects.
    Region string
    Pool where the router is located, for example, ru-6. Learn more about available pools in Product availability by location.
    AdminStateUp bool
    Specifies if the router is administratively up.
    Description string
    Description of the router.
    Name string
    Name of the router.
    RouterId string
    Unique identifier of the router. To get the router ID, in the Control panel, go to Products ⟶ Cloud Servers ⟶ Network ⟶ the Cloud routers tab ⟶ copy the ID in the card of the required router.
    Tags []string
    Tags of the router.
    project_id string
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects.
    region string
    Pool where the router is located, for example, ru-6. Learn more about available pools in Product availability by location.
    admin_state_up bool
    Specifies if the router is administratively up.
    description string
    Description of the router.
    name string
    Name of the router.
    router_id string
    Unique identifier of the router. To get the router ID, in the Control panel, go to Products ⟶ Cloud Servers ⟶ Network ⟶ the Cloud routers tab ⟶ copy the ID in the card of the required router.
    tags list(string)
    Tags of the router.
    projectId String
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects.
    region String
    Pool where the router is located, for example, ru-6. Learn more about available pools in Product availability by location.
    adminStateUp Boolean
    Specifies if the router is administratively up.
    description String
    Description of the router.
    name String
    Name of the router.
    routerId String
    Unique identifier of the router. To get the router ID, in the Control panel, go to Products ⟶ Cloud Servers ⟶ Network ⟶ the Cloud routers tab ⟶ copy the ID in the card of the required router.
    tags List<String>
    Tags of the router.
    projectId string
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects.
    region string
    Pool where the router is located, for example, ru-6. Learn more about available pools in Product availability by location.
    adminStateUp boolean
    Specifies if the router is administratively up.
    description string
    Description of the router.
    name string
    Name of the router.
    routerId string
    Unique identifier of the router. To get the router ID, in the Control panel, go to Products ⟶ Cloud Servers ⟶ Network ⟶ the Cloud routers tab ⟶ copy the ID in the card of the required router.
    tags string[]
    Tags of the router.
    project_id str
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects.
    region str
    Pool where the router is located, for example, ru-6. Learn more about available pools in Product availability by location.
    admin_state_up bool
    Specifies if the router is administratively up.
    description str
    Description of the router.
    name str
    Name of the router.
    router_id str
    Unique identifier of the router. To get the router ID, in the Control panel, go to Products ⟶ Cloud Servers ⟶ Network ⟶ the Cloud routers tab ⟶ copy the ID in the card of the required router.
    tags Sequence[str]
    Tags of the router.
    projectId String
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects.
    region String
    Pool where the router is located, for example, ru-6. Learn more about available pools in Product availability by location.
    adminStateUp Boolean
    Specifies if the router is administratively up.
    description String
    Description of the router.
    name String
    Name of the router.
    routerId String
    Unique identifier of the router. To get the router ID, in the Control panel, go to Products ⟶ Cloud Servers ⟶ Network ⟶ the Cloud routers tab ⟶ copy the ID in the card of the required router.
    tags List<String>
    Tags of the router.

    getVpcRouterV2 Result

    The following output properties are available:

    AdminStateUp bool
    Specifies if the router is administratively up.
    AllTags List<string>
    All tags of the router.
    AvailabilityZoneHints List<string>
    Pool segments requested for allocating the router.
    AvailabilityZones List<string>
    Pool segments where the router is actually allocated.
    Blocked bool
    Specifies if the router is administratively blocked.
    Description string
    Description of the router.
    EnableSnat bool
    Specifies if source NAT is enabled on the gateway.
    ExternalFixedIps List<GetVpcRouterV2ExternalFixedIp>
    Gateway addresses of the router.
    ExternalNetworkId string
    Unique identifier of the external network the gateway is attached to.
    Ha bool
    Specifies if the router runs in high availability mode.
    Id string
    Unique identifier of the router.
    Name string
    Name of the router.
    ProjectId string
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects.
    Region string
    Pool where the router is located, for example, ru-6. Learn more about available pools in Product availability by location.
    RouterId string
    Unique identifier of the router. To get the router ID, in the Control panel, go to Products ⟶ Cloud Servers ⟶ Network ⟶ the Cloud routers tab ⟶ copy the ID in the card of the required router.
    Routes List<GetVpcRouterV2Route>
    Static routes of the router.
    Status string
    Status of the router.
    Tags List<string>
    Tags of the router.
    AdminStateUp bool
    Specifies if the router is administratively up.
    AllTags []string
    All tags of the router.
    AvailabilityZoneHints []string
    Pool segments requested for allocating the router.
    AvailabilityZones []string
    Pool segments where the router is actually allocated.
    Blocked bool
    Specifies if the router is administratively blocked.
    Description string
    Description of the router.
    EnableSnat bool
    Specifies if source NAT is enabled on the gateway.
    ExternalFixedIps []GetVpcRouterV2ExternalFixedIp
    Gateway addresses of the router.
    ExternalNetworkId string
    Unique identifier of the external network the gateway is attached to.
    Ha bool
    Specifies if the router runs in high availability mode.
    Id string
    Unique identifier of the router.
    Name string
    Name of the router.
    ProjectId string
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects.
    Region string
    Pool where the router is located, for example, ru-6. Learn more about available pools in Product availability by location.
    RouterId string
    Unique identifier of the router. To get the router ID, in the Control panel, go to Products ⟶ Cloud Servers ⟶ Network ⟶ the Cloud routers tab ⟶ copy the ID in the card of the required router.
    Routes []GetVpcRouterV2Route
    Static routes of the router.
    Status string
    Status of the router.
    Tags []string
    Tags of the router.
    admin_state_up bool
    Specifies if the router is administratively up.
    all_tags list(string)
    All tags of the router.
    availability_zone_hints list(string)
    Pool segments requested for allocating the router.
    availability_zones list(string)
    Pool segments where the router is actually allocated.
    blocked bool
    Specifies if the router is administratively blocked.
    description string
    Description of the router.
    enable_snat bool
    Specifies if source NAT is enabled on the gateway.
    external_fixed_ips list(object)
    Gateway addresses of the router.
    external_network_id string
    Unique identifier of the external network the gateway is attached to.
    ha bool
    Specifies if the router runs in high availability mode.
    id string
    Unique identifier of the router.
    name string
    Name of the router.
    project_id string
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects.
    region string
    Pool where the router is located, for example, ru-6. Learn more about available pools in Product availability by location.
    router_id string
    Unique identifier of the router. To get the router ID, in the Control panel, go to Products ⟶ Cloud Servers ⟶ Network ⟶ the Cloud routers tab ⟶ copy the ID in the card of the required router.
    routes list(object)
    Static routes of the router.
    status string
    Status of the router.
    tags list(string)
    Tags of the router.
    adminStateUp Boolean
    Specifies if the router is administratively up.
    allTags List<String>
    All tags of the router.
    availabilityZoneHints List<String>
    Pool segments requested for allocating the router.
    availabilityZones List<String>
    Pool segments where the router is actually allocated.
    blocked Boolean
    Specifies if the router is administratively blocked.
    description String
    Description of the router.
    enableSnat Boolean
    Specifies if source NAT is enabled on the gateway.
    externalFixedIps List<GetVpcRouterV2ExternalFixedIp>
    Gateway addresses of the router.
    externalNetworkId String
    Unique identifier of the external network the gateway is attached to.
    ha Boolean
    Specifies if the router runs in high availability mode.
    id String
    Unique identifier of the router.
    name String
    Name of the router.
    projectId String
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects.
    region String
    Pool where the router is located, for example, ru-6. Learn more about available pools in Product availability by location.
    routerId String
    Unique identifier of the router. To get the router ID, in the Control panel, go to Products ⟶ Cloud Servers ⟶ Network ⟶ the Cloud routers tab ⟶ copy the ID in the card of the required router.
    routes List<GetVpcRouterV2Route>
    Static routes of the router.
    status String
    Status of the router.
    tags List<String>
    Tags of the router.
    adminStateUp boolean
    Specifies if the router is administratively up.
    allTags string[]
    All tags of the router.
    availabilityZoneHints string[]
    Pool segments requested for allocating the router.
    availabilityZones string[]
    Pool segments where the router is actually allocated.
    blocked boolean
    Specifies if the router is administratively blocked.
    description string
    Description of the router.
    enableSnat boolean
    Specifies if source NAT is enabled on the gateway.
    externalFixedIps GetVpcRouterV2ExternalFixedIp[]
    Gateway addresses of the router.
    externalNetworkId string
    Unique identifier of the external network the gateway is attached to.
    ha boolean
    Specifies if the router runs in high availability mode.
    id string
    Unique identifier of the router.
    name string
    Name of the router.
    projectId string
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects.
    region string
    Pool where the router is located, for example, ru-6. Learn more about available pools in Product availability by location.
    routerId string
    Unique identifier of the router. To get the router ID, in the Control panel, go to Products ⟶ Cloud Servers ⟶ Network ⟶ the Cloud routers tab ⟶ copy the ID in the card of the required router.
    routes GetVpcRouterV2Route[]
    Static routes of the router.
    status string
    Status of the router.
    tags string[]
    Tags of the router.
    admin_state_up bool
    Specifies if the router is administratively up.
    all_tags Sequence[str]
    All tags of the router.
    availability_zone_hints Sequence[str]
    Pool segments requested for allocating the router.
    availability_zones Sequence[str]
    Pool segments where the router is actually allocated.
    blocked bool
    Specifies if the router is administratively blocked.
    description str
    Description of the router.
    enable_snat bool
    Specifies if source NAT is enabled on the gateway.
    external_fixed_ips Sequence[GetVpcRouterV2ExternalFixedIp]
    Gateway addresses of the router.
    external_network_id str
    Unique identifier of the external network the gateway is attached to.
    ha bool
    Specifies if the router runs in high availability mode.
    id str
    Unique identifier of the router.
    name str
    Name of the router.
    project_id str
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects.
    region str
    Pool where the router is located, for example, ru-6. Learn more about available pools in Product availability by location.
    router_id str
    Unique identifier of the router. To get the router ID, in the Control panel, go to Products ⟶ Cloud Servers ⟶ Network ⟶ the Cloud routers tab ⟶ copy the ID in the card of the required router.
    routes Sequence[GetVpcRouterV2Route]
    Static routes of the router.
    status str
    Status of the router.
    tags Sequence[str]
    Tags of the router.
    adminStateUp Boolean
    Specifies if the router is administratively up.
    allTags List<String>
    All tags of the router.
    availabilityZoneHints List<String>
    Pool segments requested for allocating the router.
    availabilityZones List<String>
    Pool segments where the router is actually allocated.
    blocked Boolean
    Specifies if the router is administratively blocked.
    description String
    Description of the router.
    enableSnat Boolean
    Specifies if source NAT is enabled on the gateway.
    externalFixedIps List<Property Map>
    Gateway addresses of the router.
    externalNetworkId String
    Unique identifier of the external network the gateway is attached to.
    ha Boolean
    Specifies if the router runs in high availability mode.
    id String
    Unique identifier of the router.
    name String
    Name of the router.
    projectId String
    Unique identifier of the associated project, for example, a07abc12310546f1b9291ab3013a7d75. Retrieved from the selectelvpcproject_v2 resource. Learn more about Projects.
    region String
    Pool where the router is located, for example, ru-6. Learn more about available pools in Product availability by location.
    routerId String
    Unique identifier of the router. To get the router ID, in the Control panel, go to Products ⟶ Cloud Servers ⟶ Network ⟶ the Cloud routers tab ⟶ copy the ID in the card of the required router.
    routes List<Property Map>
    Static routes of the router.
    status String
    Status of the router.
    tags List<String>
    Tags of the router.

    Supporting Types

    GetVpcRouterV2ExternalFixedIp

    IpAddress string
    SubnetId string
    IpAddress string
    SubnetId string
    ip_address string
    subnet_id string
    ipAddress String
    subnetId String
    ipAddress string
    subnetId string
    ipAddress String
    subnetId String

    GetVpcRouterV2Route

    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