We recommend using Azure Native.
Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi
azure.network.getRouteTable
Explore with Pulumi AI
Use this data source to access information about an existing Route Table.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.network.getRouteTable({
name: "myroutetable",
resourceGroupName: "some-resource-group",
});
import pulumi
import pulumi_azure as azure
example = azure.network.get_route_table(name="myroutetable",
resource_group_name="some-resource-group")
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
"github.com/pulumi/pulumi/sdk/v3/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
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.Network.GetRouteTable.Invoke(new()
{
Name = "myroutetable",
ResourceGroupName = "some-resource-group",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.network.NetworkFunctions;
import com.pulumi.azure.network.inputs.GetRouteTableArgs;
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 example = NetworkFunctions.getRouteTable(GetRouteTableArgs.builder()
.name("myroutetable")
.resourceGroupName("some-resource-group")
.build());
}
}
variables:
example:
fn::invoke:
Function: azure:network:getRouteTable
Arguments:
name: myroutetable
resourceGroupName: some-resource-group
Using getRouteTable
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 getRouteTable(args: GetRouteTableArgs, opts?: InvokeOptions): Promise<GetRouteTableResult>
function getRouteTableOutput(args: GetRouteTableOutputArgs, opts?: InvokeOptions): Output<GetRouteTableResult>
def get_route_table(name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRouteTableResult
def get_route_table_output(name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRouteTableResult]
func LookupRouteTable(ctx *Context, args *LookupRouteTableArgs, opts ...InvokeOption) (*LookupRouteTableResult, error)
func LookupRouteTableOutput(ctx *Context, args *LookupRouteTableOutputArgs, opts ...InvokeOption) LookupRouteTableResultOutput
> Note: This function is named LookupRouteTable
in the Go SDK.
public static class GetRouteTable
{
public static Task<GetRouteTableResult> InvokeAsync(GetRouteTableArgs args, InvokeOptions? opts = null)
public static Output<GetRouteTableResult> Invoke(GetRouteTableInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRouteTableResult> getRouteTable(GetRouteTableArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azure:network/getRouteTable:getRouteTable
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- The name of the Route Table.
- Resource
Group stringName - The name of the Resource Group in which the Route Table exists.
- Name string
- The name of the Route Table.
- Resource
Group stringName - The name of the Resource Group in which the Route Table exists.
- name String
- The name of the Route Table.
- resource
Group StringName - The name of the Resource Group in which the Route Table exists.
- name string
- The name of the Route Table.
- resource
Group stringName - The name of the Resource Group in which the Route Table exists.
- name str
- The name of the Route Table.
- resource_
group_ strname - The name of the Resource Group in which the Route Table exists.
- name String
- The name of the Route Table.
- resource
Group StringName - The name of the Resource Group in which the Route Table exists.
getRouteTable Result
The following output properties are available:
- Bgp
Route boolPropagation Enabled - Boolean flag which controls propagation of routes learned by BGP on that 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.
- Resource
Group stringName - Routes
List<Get
Route Table Route> - One or more
route
blocks as documented below. - Subnets List<string>
- The collection of Subnets associated with this route table.
- Dictionary<string, string>
- A mapping of tags assigned to the Route Table.
- Bgp
Route boolPropagation Enabled - Boolean flag which controls propagation of routes learned by BGP on that 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.
- Resource
Group stringName - Routes
[]Get
Route Table Route - One or more
route
blocks as documented below. - Subnets []string
- The collection of Subnets associated with this route table.
- map[string]string
- A mapping of tags assigned to the Route Table.
- bgp
Route BooleanPropagation Enabled - Boolean flag which controls propagation of routes learned by BGP on that 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.
- resource
Group StringName - routes
List<Get
Route Table Route> - One or more
route
blocks as documented below. - subnets List<String>
- The collection of Subnets associated with this route table.
- Map<String,String>
- A mapping of tags assigned to the Route Table.
- bgp
Route booleanPropagation Enabled - Boolean flag which controls propagation of routes learned by BGP on that 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.
- resource
Group stringName - routes
Get
Route Table Route[] - One or more
route
blocks as documented below. - subnets string[]
- The collection of Subnets associated with this route table.
- {[key: string]: string}
- A mapping of tags assigned to the Route Table.
- bgp_
route_ boolpropagation_ enabled - Boolean flag which controls propagation of routes learned by BGP on that 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_ strname - routes
Sequence[Get
Route Table Route] - One or more
route
blocks as documented below. - subnets Sequence[str]
- The collection of Subnets associated with this route table.
- Mapping[str, str]
- A mapping of tags assigned to the Route Table.
- bgp
Route BooleanPropagation Enabled - Boolean flag which controls propagation of routes learned by BGP on that 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.
- resource
Group StringName - routes List<Property Map>
- One or more
route
blocks as documented below. - subnets List<String>
- The collection of Subnets associated with this route table.
- Map<String>
- A mapping of tags assigned to the Route Table.
Supporting Types
GetRouteTableRoute
- Address
Prefix string - The destination CIDR to which the route applies.
- Name string
- The name of the Route Table.
- Next
Hop stringIn Ip Address - Contains the IP address packets should be forwarded to.
- Next
Hop stringType - The type of Azure hop the packet should be sent to.
- Address
Prefix string - The destination CIDR to which the route applies.
- Name string
- The name of the Route Table.
- Next
Hop stringIn Ip Address - Contains the IP address packets should be forwarded to.
- Next
Hop stringType - The type of Azure hop the packet should be sent to.
- address
Prefix String - The destination CIDR to which the route applies.
- name String
- The name of the Route Table.
- next
Hop StringIn Ip Address - Contains the IP address packets should be forwarded to.
- next
Hop StringType - The type of Azure hop the packet should be sent to.
- address
Prefix string - The destination CIDR to which the route applies.
- name string
- The name of the Route Table.
- next
Hop stringIn Ip Address - Contains the IP address packets should be forwarded to.
- next
Hop stringType - 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_ strin_ ip_ address - Contains the IP address packets should be forwarded to.
- next_
hop_ strtype - The type of Azure hop the packet should be sent to.
- address
Prefix String - The destination CIDR to which the route applies.
- name String
- The name of the Route Table.
- next
Hop StringIn Ip Address - Contains the IP address packets should be forwarded to.
- next
Hop StringType - The type of Azure hop the packet should be sent to.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.