GetRouteTable

Use this data source to access information about an existing Route Table.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.Network.GetRouteTable.InvokeAsync(new Azure.Network.GetRouteTableArgs
        {
            Name = "myroutetable",
            ResourceGroupName = "some-resource-group",
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/network"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := network.LookupRouteTable(ctx, &network.LookupRouteTableArgs{
            Name:              "myroutetable",
            ResourceGroupName: "some-resource-group",
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example = azure.network.get_route_table(name="myroutetable",
    resource_group_name="some-resource-group")
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = pulumi.output(azure.network.getRouteTable({
    name: "myroutetable",
    resourceGroupName: "some-resource-group",
}, { async: true }));

Using GetRouteTable

function getRouteTable(args: GetRouteTableArgs, opts?: InvokeOptions): Promise<GetRouteTableResult>
function  get_route_table(name=None, resource_group_name=None, opts=None)
func LookupRouteTable(ctx *Context, args *LookupRouteTableArgs, opts ...InvokeOption) (*LookupRouteTableResult, error)

Note: This function is named LookupRouteTable in the Go SDK.

public static class GetRouteTable {
    public static Task<GetRouteTableResult> InvokeAsync(GetRouteTableArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

The name of the Route Table.

ResourceGroupName string

The name of the Resource Group in which the Route Table exists.

Name string

The name of the Route Table.

ResourceGroupName string

The name of the Resource Group in which the Route Table exists.

name string

The name of the Route Table.

resourceGroupName string

The name of the Resource Group in which the Route Table exists.

name str

The name of the Route Table.

resource_group_name str

The name of the Resource Group in which the Route Table exists.

GetRouteTable Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Location string

The Azure Region in which the Route Table exists.

Name string

The name of the Route.

ResourceGroupName string
Routes List<GetRouteTableRoute>

One or more route blocks as documented below.

Subnets List<string>

The collection of Subnets associated with this route table.

Tags Dictionary<string, string>

A mapping of tags assigned to the Route Table.

Id string

The provider-assigned unique ID for this managed resource.

Location string

The Azure Region in which the Route Table exists.

Name string

The name of the Route.

ResourceGroupName string
Routes []GetRouteTableRoute

One or more route blocks as documented below.

Subnets []string

The collection of Subnets associated with this route table.

Tags map[string]string

A mapping of tags assigned to the Route Table.

id string

The provider-assigned unique ID for this managed resource.

location string

The Azure Region in which the Route Table exists.

name string

The name of the Route.

resourceGroupName string
routes GetRouteTableRoute[]

One or more route blocks as documented below.

subnets string[]

The collection of Subnets associated with this route table.

tags {[key: string]: string}

A mapping of tags assigned to the Route Table.

id str

The provider-assigned unique ID for this managed resource.

location str

The Azure Region in which the Route Table exists.

name str

The name of the Route.

resource_group_name str
routes List[GetRouteTableRoute]

One or more route blocks as documented below.

subnets List[str]

The collection of Subnets associated with this route table.

tags Dict[str, str]

A mapping of tags assigned to the Route Table.

Supporting Types

GetRouteTableRoute

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

AddressPrefix string

The destination CIDR to which the route applies.

Name string

The name of the Route Table.

NextHopInIpAddress string

Contains the IP address packets should be forwarded to.

NextHopType string

The type of Azure hop the packet should be sent to.

AddressPrefix string

The destination CIDR to which the route applies.

Name string

The name of the Route Table.

NextHopInIpAddress string

Contains the IP address packets should be forwarded to.

NextHopType string

The type of Azure hop the packet should be sent to.

addressPrefix string

The destination CIDR to which the route applies.

name string

The name of the Route Table.

nextHopInIpAddress string

Contains the IP address packets should be forwarded to.

nextHopType string

The type of Azure hop the packet should be sent to.

address_prefix str

The destination CIDR to which the route applies.

name str

The name of the Route Table.

next_hop_in_ip_address str

Contains the IP address packets should be forwarded to.

next_hop_type str

The type of Azure hop the packet should be sent to.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.