1. Packages
  2. Gcore Provider
  3. API Docs
  4. getCloudNetworkRouter
Viewing docs for gcore 2.0.0-alpha.2
published on Tuesday, Mar 24, 2026 by g-core
gcore logo
Viewing docs for gcore 2.0.0-alpha.2
published on Tuesday, Mar 24, 2026 by g-core

    Routers interconnect subnets and manage network routing, including external gateway connectivity and static routes.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcore from "@pulumi/gcore";
    
    const exampleCloudNetworkRouter = gcore.getCloudNetworkRouter({
        projectId: 0,
        regionId: 0,
        routerId: "router_id",
    });
    
    import pulumi
    import pulumi_gcore as gcore
    
    example_cloud_network_router = gcore.get_cloud_network_router(project_id=0,
        region_id=0,
        router_id="router_id")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/v2/gcore"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := gcore.LookupCloudNetworkRouter(ctx, &gcore.LookupCloudNetworkRouterArgs{
    			ProjectId: pulumi.Float64Ref(0),
    			RegionId:  pulumi.Float64Ref(0),
    			RouterId:  "router_id",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcore = Pulumi.Gcore;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleCloudNetworkRouter = Gcore.GetCloudNetworkRouter.Invoke(new()
        {
            ProjectId = 0,
            RegionId = 0,
            RouterId = "router_id",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcore.GcoreFunctions;
    import com.pulumi.gcore.inputs.GetCloudNetworkRouterArgs;
    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 exampleCloudNetworkRouter = GcoreFunctions.getCloudNetworkRouter(GetCloudNetworkRouterArgs.builder()
                .projectId(0)
                .regionId(0)
                .routerId("router_id")
                .build());
    
        }
    }
    
    variables:
      exampleCloudNetworkRouter:
        fn::invoke:
          function: gcore:getCloudNetworkRouter
          arguments:
            projectId: 0
            regionId: 0
            routerId: router_id
    

    Using getCloudNetworkRouter

    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 getCloudNetworkRouter(args: GetCloudNetworkRouterArgs, opts?: InvokeOptions): Promise<GetCloudNetworkRouterResult>
    function getCloudNetworkRouterOutput(args: GetCloudNetworkRouterOutputArgs, opts?: InvokeOptions): Output<GetCloudNetworkRouterResult>
    def get_cloud_network_router(project_id: Optional[float] = None,
                                 region_id: Optional[float] = None,
                                 router_id: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetCloudNetworkRouterResult
    def get_cloud_network_router_output(project_id: Optional[pulumi.Input[float]] = None,
                                 region_id: Optional[pulumi.Input[float]] = None,
                                 router_id: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetCloudNetworkRouterResult]
    func LookupCloudNetworkRouter(ctx *Context, args *LookupCloudNetworkRouterArgs, opts ...InvokeOption) (*LookupCloudNetworkRouterResult, error)
    func LookupCloudNetworkRouterOutput(ctx *Context, args *LookupCloudNetworkRouterOutputArgs, opts ...InvokeOption) LookupCloudNetworkRouterResultOutput

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

    public static class GetCloudNetworkRouter 
    {
        public static Task<GetCloudNetworkRouterResult> InvokeAsync(GetCloudNetworkRouterArgs args, InvokeOptions? opts = null)
        public static Output<GetCloudNetworkRouterResult> Invoke(GetCloudNetworkRouterInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCloudNetworkRouterResult> getCloudNetworkRouter(GetCloudNetworkRouterArgs args, InvokeOptions options)
    public static Output<GetCloudNetworkRouterResult> getCloudNetworkRouter(GetCloudNetworkRouterArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gcore:index/getCloudNetworkRouter:getCloudNetworkRouter
      arguments:
        # arguments dictionary

    The following arguments are supported:

    RouterId string
    ProjectId double
    RegionId double
    RouterId string
    ProjectId float64
    RegionId float64
    routerId String
    projectId Double
    regionId Double
    routerId string
    projectId number
    regionId number
    routerId String
    projectId Number
    regionId Number

    getCloudNetworkRouter Result

    The following output properties are available:

    CreatedAt string
    Datetime when the router was created
    CreatorTaskId string
    Task that created this entity
    Distributed bool
    Whether the router is distributed or centralized.
    ExternalGatewayInfo GetCloudNetworkRouterExternalGatewayInfo
    State of this router's external gateway.
    Id string
    The ID of this resource.
    Interfaces List<GetCloudNetworkRouterInterface>
    List of router interfaces.
    Name string
    Router name
    Region string
    Region name
    RouterId string
    Routes List<GetCloudNetworkRouterRoute>
    List of custom routes.
    Status string
    Status of the router.
    UpdatedAt string
    Datetime when the router was last updated
    ProjectId double
    RegionId double
    CreatedAt string
    Datetime when the router was created
    CreatorTaskId string
    Task that created this entity
    Distributed bool
    Whether the router is distributed or centralized.
    ExternalGatewayInfo GetCloudNetworkRouterExternalGatewayInfo
    State of this router's external gateway.
    Id string
    The ID of this resource.
    Interfaces []GetCloudNetworkRouterInterface
    List of router interfaces.
    Name string
    Router name
    Region string
    Region name
    RouterId string
    Routes []GetCloudNetworkRouterRoute
    List of custom routes.
    Status string
    Status of the router.
    UpdatedAt string
    Datetime when the router was last updated
    ProjectId float64
    RegionId float64
    createdAt String
    Datetime when the router was created
    creatorTaskId String
    Task that created this entity
    distributed Boolean
    Whether the router is distributed or centralized.
    externalGatewayInfo GetCloudNetworkRouterExternalGatewayInfo
    State of this router's external gateway.
    id String
    The ID of this resource.
    interfaces List<GetCloudNetworkRouterInterface>
    List of router interfaces.
    name String
    Router name
    region String
    Region name
    routerId String
    routes List<GetCloudNetworkRouterRoute>
    List of custom routes.
    status String
    Status of the router.
    updatedAt String
    Datetime when the router was last updated
    projectId Double
    regionId Double
    createdAt string
    Datetime when the router was created
    creatorTaskId string
    Task that created this entity
    distributed boolean
    Whether the router is distributed or centralized.
    externalGatewayInfo GetCloudNetworkRouterExternalGatewayInfo
    State of this router's external gateway.
    id string
    The ID of this resource.
    interfaces GetCloudNetworkRouterInterface[]
    List of router interfaces.
    name string
    Router name
    region string
    Region name
    routerId string
    routes GetCloudNetworkRouterRoute[]
    List of custom routes.
    status string
    Status of the router.
    updatedAt string
    Datetime when the router was last updated
    projectId number
    regionId number
    created_at str
    Datetime when the router was created
    creator_task_id str
    Task that created this entity
    distributed bool
    Whether the router is distributed or centralized.
    external_gateway_info GetCloudNetworkRouterExternalGatewayInfo
    State of this router's external gateway.
    id str
    The ID of this resource.
    interfaces Sequence[GetCloudNetworkRouterInterface]
    List of router interfaces.
    name str
    Router name
    region str
    Region name
    router_id str
    routes Sequence[GetCloudNetworkRouterRoute]
    List of custom routes.
    status str
    Status of the router.
    updated_at str
    Datetime when the router was last updated
    project_id float
    region_id float
    createdAt String
    Datetime when the router was created
    creatorTaskId String
    Task that created this entity
    distributed Boolean
    Whether the router is distributed or centralized.
    externalGatewayInfo Property Map
    State of this router's external gateway.
    id String
    The ID of this resource.
    interfaces List<Property Map>
    List of router interfaces.
    name String
    Router name
    region String
    Region name
    routerId String
    routes List<Property Map>
    List of custom routes.
    status String
    Status of the router.
    updatedAt String
    Datetime when the router was last updated
    projectId Number
    regionId Number

    Supporting Types

    GetCloudNetworkRouterExternalGatewayInfo

    EnableSnat bool
    Is SNAT enabled.
    ExternalFixedIps List<GetCloudNetworkRouterExternalGatewayInfoExternalFixedIp>
    List of external IPs that emit SNAT-ed traffic.
    NetworkId string
    Id of the external network.
    EnableSnat bool
    Is SNAT enabled.
    ExternalFixedIps []GetCloudNetworkRouterExternalGatewayInfoExternalFixedIp
    List of external IPs that emit SNAT-ed traffic.
    NetworkId string
    Id of the external network.
    enableSnat Boolean
    Is SNAT enabled.
    externalFixedIps List<GetCloudNetworkRouterExternalGatewayInfoExternalFixedIp>
    List of external IPs that emit SNAT-ed traffic.
    networkId String
    Id of the external network.
    enableSnat boolean
    Is SNAT enabled.
    externalFixedIps GetCloudNetworkRouterExternalGatewayInfoExternalFixedIp[]
    List of external IPs that emit SNAT-ed traffic.
    networkId string
    Id of the external network.
    enable_snat bool
    Is SNAT enabled.
    external_fixed_ips Sequence[GetCloudNetworkRouterExternalGatewayInfoExternalFixedIp]
    List of external IPs that emit SNAT-ed traffic.
    network_id str
    Id of the external network.
    enableSnat Boolean
    Is SNAT enabled.
    externalFixedIps List<Property Map>
    List of external IPs that emit SNAT-ed traffic.
    networkId String
    Id of the external network.

    GetCloudNetworkRouterExternalGatewayInfoExternalFixedIp

    IpAddress string
    IP address
    SubnetId string
    ID of the subnet that allocated the IP
    IpAddress string
    IP address
    SubnetId string
    ID of the subnet that allocated the IP
    ipAddress String
    IP address
    subnetId String
    ID of the subnet that allocated the IP
    ipAddress string
    IP address
    subnetId string
    ID of the subnet that allocated the IP
    ip_address str
    IP address
    subnet_id str
    ID of the subnet that allocated the IP
    ipAddress String
    IP address
    subnetId String
    ID of the subnet that allocated the IP

    GetCloudNetworkRouterInterface

    IpAssignments List<GetCloudNetworkRouterInterfaceIpAssignment>
    IP addresses assigned to this port
    MacAddress string
    MAC address of the virtual port
    NetworkId string
    ID of the network the port is attached to
    PortId string
    ID of virtual ethernet port object
    IpAssignments []GetCloudNetworkRouterInterfaceIpAssignment
    IP addresses assigned to this port
    MacAddress string
    MAC address of the virtual port
    NetworkId string
    ID of the network the port is attached to
    PortId string
    ID of virtual ethernet port object
    ipAssignments List<GetCloudNetworkRouterInterfaceIpAssignment>
    IP addresses assigned to this port
    macAddress String
    MAC address of the virtual port
    networkId String
    ID of the network the port is attached to
    portId String
    ID of virtual ethernet port object
    ipAssignments GetCloudNetworkRouterInterfaceIpAssignment[]
    IP addresses assigned to this port
    macAddress string
    MAC address of the virtual port
    networkId string
    ID of the network the port is attached to
    portId string
    ID of virtual ethernet port object
    ip_assignments Sequence[GetCloudNetworkRouterInterfaceIpAssignment]
    IP addresses assigned to this port
    mac_address str
    MAC address of the virtual port
    network_id str
    ID of the network the port is attached to
    port_id str
    ID of virtual ethernet port object
    ipAssignments List<Property Map>
    IP addresses assigned to this port
    macAddress String
    MAC address of the virtual port
    networkId String
    ID of the network the port is attached to
    portId String
    ID of virtual ethernet port object

    GetCloudNetworkRouterInterfaceIpAssignment

    IpAddress string
    IP address
    SubnetId string
    ID of the subnet that allocated the IP
    IpAddress string
    IP address
    SubnetId string
    ID of the subnet that allocated the IP
    ipAddress String
    IP address
    subnetId String
    ID of the subnet that allocated the IP
    ipAddress string
    IP address
    subnetId string
    ID of the subnet that allocated the IP
    ip_address str
    IP address
    subnet_id str
    ID of the subnet that allocated the IP
    ipAddress String
    IP address
    subnetId String
    ID of the subnet that allocated the IP

    GetCloudNetworkRouterRoute

    Destination string
    CIDR of destination IPv4 subnet.
    Nexthop string
    IPv4 address to forward traffic to if it's destination IP matches 'destination' CIDR.
    Destination string
    CIDR of destination IPv4 subnet.
    Nexthop string
    IPv4 address to forward traffic to if it's destination IP matches 'destination' CIDR.
    destination String
    CIDR of destination IPv4 subnet.
    nexthop String
    IPv4 address to forward traffic to if it's destination IP matches 'destination' CIDR.
    destination string
    CIDR of destination IPv4 subnet.
    nexthop string
    IPv4 address to forward traffic to if it's destination IP matches 'destination' CIDR.
    destination str
    CIDR of destination IPv4 subnet.
    nexthop str
    IPv4 address to forward traffic to if it's destination IP matches 'destination' CIDR.
    destination String
    CIDR of destination IPv4 subnet.
    nexthop String
    IPv4 address to forward traffic to if it's destination IP matches 'destination' CIDR.

    Package Details

    Repository
    gcore g-core/terraform-provider-gcore
    License
    Notes
    This Pulumi package is based on the gcore Terraform Provider.
    gcore logo
    Viewing docs for gcore 2.0.0-alpha.2
    published on Tuesday, Mar 24, 2026 by g-core
      Try Pulumi Cloud free. Your team will thank you.