1. Packages
  2. Gcore Provider
  3. API Docs
  4. getCloudNetworkRouters
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 exampleCloudNetworkRouters = gcore.getCloudNetworkRouters({
        projectId: 0,
        regionId: 0,
    });
    
    import pulumi
    import pulumi_gcore as gcore
    
    example_cloud_network_routers = gcore.get_cloud_network_routers(project_id=0,
        region_id=0)
    
    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.GetCloudNetworkRouters(ctx, &gcore.GetCloudNetworkRoutersArgs{
    			ProjectId: pulumi.Float64Ref(0),
    			RegionId:  pulumi.Float64Ref(0),
    		}, 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 exampleCloudNetworkRouters = Gcore.GetCloudNetworkRouters.Invoke(new()
        {
            ProjectId = 0,
            RegionId = 0,
        });
    
    });
    
    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.GetCloudNetworkRoutersArgs;
    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 exampleCloudNetworkRouters = GcoreFunctions.getCloudNetworkRouters(GetCloudNetworkRoutersArgs.builder()
                .projectId(0)
                .regionId(0)
                .build());
    
        }
    }
    
    variables:
      exampleCloudNetworkRouters:
        fn::invoke:
          function: gcore:getCloudNetworkRouters
          arguments:
            projectId: 0
            regionId: 0
    

    Using getCloudNetworkRouters

    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 getCloudNetworkRouters(args: GetCloudNetworkRoutersArgs, opts?: InvokeOptions): Promise<GetCloudNetworkRoutersResult>
    function getCloudNetworkRoutersOutput(args: GetCloudNetworkRoutersOutputArgs, opts?: InvokeOptions): Output<GetCloudNetworkRoutersResult>
    def get_cloud_network_routers(max_items: Optional[float] = None,
                                  project_id: Optional[float] = None,
                                  region_id: Optional[float] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetCloudNetworkRoutersResult
    def get_cloud_network_routers_output(max_items: Optional[pulumi.Input[float]] = None,
                                  project_id: Optional[pulumi.Input[float]] = None,
                                  region_id: Optional[pulumi.Input[float]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetCloudNetworkRoutersResult]
    func GetCloudNetworkRouters(ctx *Context, args *GetCloudNetworkRoutersArgs, opts ...InvokeOption) (*GetCloudNetworkRoutersResult, error)
    func GetCloudNetworkRoutersOutput(ctx *Context, args *GetCloudNetworkRoutersOutputArgs, opts ...InvokeOption) GetCloudNetworkRoutersResultOutput

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

    public static class GetCloudNetworkRouters 
    {
        public static Task<GetCloudNetworkRoutersResult> InvokeAsync(GetCloudNetworkRoutersArgs args, InvokeOptions? opts = null)
        public static Output<GetCloudNetworkRoutersResult> Invoke(GetCloudNetworkRoutersInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCloudNetworkRoutersResult> getCloudNetworkRouters(GetCloudNetworkRoutersArgs args, InvokeOptions options)
    public static Output<GetCloudNetworkRoutersResult> getCloudNetworkRouters(GetCloudNetworkRoutersArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gcore:index/getCloudNetworkRouters:getCloudNetworkRouters
      arguments:
        # arguments dictionary

    The following arguments are supported:

    MaxItems double
    Max items to fetch, default: 1000
    ProjectId double
    RegionId double
    MaxItems float64
    Max items to fetch, default: 1000
    ProjectId float64
    RegionId float64
    maxItems Double
    Max items to fetch, default: 1000
    projectId Double
    regionId Double
    maxItems number
    Max items to fetch, default: 1000
    projectId number
    regionId number
    max_items float
    Max items to fetch, default: 1000
    project_id float
    region_id float
    maxItems Number
    Max items to fetch, default: 1000
    projectId Number
    regionId Number

    getCloudNetworkRouters Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Items List<GetCloudNetworkRoutersItem>
    The items returned by the data source
    MaxItems double
    Max items to fetch, default: 1000
    ProjectId double
    RegionId double
    Id string
    The provider-assigned unique ID for this managed resource.
    Items []GetCloudNetworkRoutersItem
    The items returned by the data source
    MaxItems float64
    Max items to fetch, default: 1000
    ProjectId float64
    RegionId float64
    id String
    The provider-assigned unique ID for this managed resource.
    items List<GetCloudNetworkRoutersItem>
    The items returned by the data source
    maxItems Double
    Max items to fetch, default: 1000
    projectId Double
    regionId Double
    id string
    The provider-assigned unique ID for this managed resource.
    items GetCloudNetworkRoutersItem[]
    The items returned by the data source
    maxItems number
    Max items to fetch, default: 1000
    projectId number
    regionId number
    id str
    The provider-assigned unique ID for this managed resource.
    items Sequence[GetCloudNetworkRoutersItem]
    The items returned by the data source
    max_items float
    Max items to fetch, default: 1000
    project_id float
    region_id float
    id String
    The provider-assigned unique ID for this managed resource.
    items List<Property Map>
    The items returned by the data source
    maxItems Number
    Max items to fetch, default: 1000
    projectId Number
    regionId Number

    Supporting Types

    GetCloudNetworkRoutersItem

    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 GetCloudNetworkRoutersItemExternalGatewayInfo
    State of this router's external gateway.
    Id string
    Router ID
    Interfaces List<GetCloudNetworkRoutersItemInterface>
    List of router interfaces.
    Name string
    Router name
    ProjectId double
    Project ID
    Region string
    Region name
    RegionId double
    Region ID
    Routes List<GetCloudNetworkRoutersItemRoute>
    List of custom routes.
    Status string
    Status of the router.
    UpdatedAt string
    Datetime when the router was last updated
    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 GetCloudNetworkRoutersItemExternalGatewayInfo
    State of this router's external gateway.
    Id string
    Router ID
    Interfaces []GetCloudNetworkRoutersItemInterface
    List of router interfaces.
    Name string
    Router name
    ProjectId float64
    Project ID
    Region string
    Region name
    RegionId float64
    Region ID
    Routes []GetCloudNetworkRoutersItemRoute
    List of custom routes.
    Status string
    Status of the router.
    UpdatedAt string
    Datetime when the router was last updated
    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 GetCloudNetworkRoutersItemExternalGatewayInfo
    State of this router's external gateway.
    id String
    Router ID
    interfaces List<GetCloudNetworkRoutersItemInterface>
    List of router interfaces.
    name String
    Router name
    projectId Double
    Project ID
    region String
    Region name
    regionId Double
    Region ID
    routes List<GetCloudNetworkRoutersItemRoute>
    List of custom routes.
    status String
    Status of the router.
    updatedAt String
    Datetime when the router was last updated
    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 GetCloudNetworkRoutersItemExternalGatewayInfo
    State of this router's external gateway.
    id string
    Router ID
    interfaces GetCloudNetworkRoutersItemInterface[]
    List of router interfaces.
    name string
    Router name
    projectId number
    Project ID
    region string
    Region name
    regionId number
    Region ID
    routes GetCloudNetworkRoutersItemRoute[]
    List of custom routes.
    status string
    Status of the router.
    updatedAt string
    Datetime when the router was last updated
    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 GetCloudNetworkRoutersItemExternalGatewayInfo
    State of this router's external gateway.
    id str
    Router ID
    interfaces Sequence[GetCloudNetworkRoutersItemInterface]
    List of router interfaces.
    name str
    Router name
    project_id float
    Project ID
    region str
    Region name
    region_id float
    Region ID
    routes Sequence[GetCloudNetworkRoutersItemRoute]
    List of custom routes.
    status str
    Status of the router.
    updated_at str
    Datetime when the router was last updated
    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
    Router ID
    interfaces List<Property Map>
    List of router interfaces.
    name String
    Router name
    projectId Number
    Project ID
    region String
    Region name
    regionId Number
    Region ID
    routes List<Property Map>
    List of custom routes.
    status String
    Status of the router.
    updatedAt String
    Datetime when the router was last updated

    GetCloudNetworkRoutersItemExternalGatewayInfo

    EnableSnat bool
    Is SNAT enabled.
    ExternalFixedIps List<GetCloudNetworkRoutersItemExternalGatewayInfoExternalFixedIp>
    List of external IPs that emit SNAT-ed traffic.
    NetworkId string
    Id of the external network.
    EnableSnat bool
    Is SNAT enabled.
    ExternalFixedIps []GetCloudNetworkRoutersItemExternalGatewayInfoExternalFixedIp
    List of external IPs that emit SNAT-ed traffic.
    NetworkId string
    Id of the external network.
    enableSnat Boolean
    Is SNAT enabled.
    externalFixedIps List<GetCloudNetworkRoutersItemExternalGatewayInfoExternalFixedIp>
    List of external IPs that emit SNAT-ed traffic.
    networkId String
    Id of the external network.
    enableSnat boolean
    Is SNAT enabled.
    externalFixedIps GetCloudNetworkRoutersItemExternalGatewayInfoExternalFixedIp[]
    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[GetCloudNetworkRoutersItemExternalGatewayInfoExternalFixedIp]
    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.

    GetCloudNetworkRoutersItemExternalGatewayInfoExternalFixedIp

    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

    GetCloudNetworkRoutersItemInterface

    IpAssignments List<GetCloudNetworkRoutersItemInterfaceIpAssignment>
    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 []GetCloudNetworkRoutersItemInterfaceIpAssignment
    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<GetCloudNetworkRoutersItemInterfaceIpAssignment>
    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 GetCloudNetworkRoutersItemInterfaceIpAssignment[]
    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[GetCloudNetworkRoutersItemInterfaceIpAssignment]
    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

    GetCloudNetworkRoutersItemInterfaceIpAssignment

    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

    GetCloudNetworkRoutersItemRoute

    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.