1. Packages
  2. Azure Native
  3. API Docs
  4. network
  5. HubRouteTable
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi

azure-native.network.HubRouteTable

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi

RouteTable resource in a virtual hub.

Uses Azure REST API version 2024-05-01. In version 2.x of the Azure Native provider, it used API version 2023-02-01.

Other available API versions: 2020-04-01, 2020-05-01, 2020-06-01, 2020-07-01, 2020-08-01, 2020-11-01, 2021-02-01, 2021-03-01, 2021-05-01, 2021-08-01, 2022-01-01, 2022-05-01, 2022-07-01, 2022-09-01, 2022-11-01, 2023-02-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01, 2024-03-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native network [ApiVersion]. See the version guide for details.

Example Usage

RouteTablePut

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var hubRouteTable = new AzureNative.Network.HubRouteTable("hubRouteTable", new()
    {
        Labels = new[]
        {
            "label1",
            "label2",
        },
        ResourceGroupName = "rg1",
        RouteTableName = "hubRouteTable1",
        Routes = new[]
        {
            new AzureNative.Network.Inputs.HubRouteArgs
            {
                DestinationType = "CIDR",
                Destinations = new[]
                {
                    "10.0.0.0/8",
                    "20.0.0.0/8",
                    "30.0.0.0/8",
                },
                Name = "route1",
                NextHop = "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azureFirewall1",
                NextHopType = "ResourceId",
            },
        },
        VirtualHubName = "virtualHub1",
    });

});
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := network.NewHubRouteTable(ctx, "hubRouteTable", &network.HubRouteTableArgs{
			Labels: pulumi.StringArray{
				pulumi.String("label1"),
				pulumi.String("label2"),
			},
			ResourceGroupName: pulumi.String("rg1"),
			RouteTableName:    pulumi.String("hubRouteTable1"),
			Routes: network.HubRouteArray{
				&network.HubRouteArgs{
					DestinationType: pulumi.String("CIDR"),
					Destinations: pulumi.StringArray{
						pulumi.String("10.0.0.0/8"),
						pulumi.String("20.0.0.0/8"),
						pulumi.String("30.0.0.0/8"),
					},
					Name:        pulumi.String("route1"),
					NextHop:     pulumi.String("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azureFirewall1"),
					NextHopType: pulumi.String("ResourceId"),
				},
			},
			VirtualHubName: pulumi.String("virtualHub1"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.network.HubRouteTable;
import com.pulumi.azurenative.network.HubRouteTableArgs;
import com.pulumi.azurenative.network.inputs.HubRouteArgs;
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) {
        var hubRouteTable = new HubRouteTable("hubRouteTable", HubRouteTableArgs.builder()
            .labels(            
                "label1",
                "label2")
            .resourceGroupName("rg1")
            .routeTableName("hubRouteTable1")
            .routes(HubRouteArgs.builder()
                .destinationType("CIDR")
                .destinations(                
                    "10.0.0.0/8",
                    "20.0.0.0/8",
                    "30.0.0.0/8")
                .name("route1")
                .nextHop("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azureFirewall1")
                .nextHopType("ResourceId")
                .build())
            .virtualHubName("virtualHub1")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const hubRouteTable = new azure_native.network.HubRouteTable("hubRouteTable", {
    labels: [
        "label1",
        "label2",
    ],
    resourceGroupName: "rg1",
    routeTableName: "hubRouteTable1",
    routes: [{
        destinationType: "CIDR",
        destinations: [
            "10.0.0.0/8",
            "20.0.0.0/8",
            "30.0.0.0/8",
        ],
        name: "route1",
        nextHop: "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azureFirewall1",
        nextHopType: "ResourceId",
    }],
    virtualHubName: "virtualHub1",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

hub_route_table = azure_native.network.HubRouteTable("hubRouteTable",
    labels=[
        "label1",
        "label2",
    ],
    resource_group_name="rg1",
    route_table_name="hubRouteTable1",
    routes=[{
        "destination_type": "CIDR",
        "destinations": [
            "10.0.0.0/8",
            "20.0.0.0/8",
            "30.0.0.0/8",
        ],
        "name": "route1",
        "next_hop": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azureFirewall1",
        "next_hop_type": "ResourceId",
    }],
    virtual_hub_name="virtualHub1")
Copy
resources:
  hubRouteTable:
    type: azure-native:network:HubRouteTable
    properties:
      labels:
        - label1
        - label2
      resourceGroupName: rg1
      routeTableName: hubRouteTable1
      routes:
        - destinationType: CIDR
          destinations:
            - 10.0.0.0/8
            - 20.0.0.0/8
            - 30.0.0.0/8
          name: route1
          nextHop: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azureFirewall1
          nextHopType: ResourceId
      virtualHubName: virtualHub1
Copy

Create HubRouteTable Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new HubRouteTable(name: string, args: HubRouteTableArgs, opts?: CustomResourceOptions);
@overload
def HubRouteTable(resource_name: str,
                  args: HubRouteTableArgs,
                  opts: Optional[ResourceOptions] = None)

@overload
def HubRouteTable(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  resource_group_name: Optional[str] = None,
                  virtual_hub_name: Optional[str] = None,
                  id: Optional[str] = None,
                  labels: Optional[Sequence[str]] = None,
                  name: Optional[str] = None,
                  route_table_name: Optional[str] = None,
                  routes: Optional[Sequence[HubRouteArgs]] = None)
func NewHubRouteTable(ctx *Context, name string, args HubRouteTableArgs, opts ...ResourceOption) (*HubRouteTable, error)
public HubRouteTable(string name, HubRouteTableArgs args, CustomResourceOptions? opts = null)
public HubRouteTable(String name, HubRouteTableArgs args)
public HubRouteTable(String name, HubRouteTableArgs args, CustomResourceOptions options)
type: azure-native:network:HubRouteTable
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. HubRouteTableArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. HubRouteTableArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. HubRouteTableArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. HubRouteTableArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. HubRouteTableArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var hubRouteTableResource = new AzureNative.Network.HubRouteTable("hubRouteTableResource", new()
{
    ResourceGroupName = "string",
    VirtualHubName = "string",
    Id = "string",
    Labels = new[]
    {
        "string",
    },
    Name = "string",
    RouteTableName = "string",
    Routes = new[]
    {
        new AzureNative.Network.Inputs.HubRouteArgs
        {
            DestinationType = "string",
            Destinations = new[]
            {
                "string",
            },
            Name = "string",
            NextHop = "string",
            NextHopType = "string",
        },
    },
});
Copy
example, err := network.NewHubRouteTable(ctx, "hubRouteTableResource", &network.HubRouteTableArgs{
	ResourceGroupName: pulumi.String("string"),
	VirtualHubName:    pulumi.String("string"),
	Id:                pulumi.String("string"),
	Labels: pulumi.StringArray{
		pulumi.String("string"),
	},
	Name:           pulumi.String("string"),
	RouteTableName: pulumi.String("string"),
	Routes: network.HubRouteArray{
		&network.HubRouteArgs{
			DestinationType: pulumi.String("string"),
			Destinations: pulumi.StringArray{
				pulumi.String("string"),
			},
			Name:        pulumi.String("string"),
			NextHop:     pulumi.String("string"),
			NextHopType: pulumi.String("string"),
		},
	},
})
Copy
var hubRouteTableResource = new HubRouteTable("hubRouteTableResource", HubRouteTableArgs.builder()
    .resourceGroupName("string")
    .virtualHubName("string")
    .id("string")
    .labels("string")
    .name("string")
    .routeTableName("string")
    .routes(HubRouteArgs.builder()
        .destinationType("string")
        .destinations("string")
        .name("string")
        .nextHop("string")
        .nextHopType("string")
        .build())
    .build());
Copy
hub_route_table_resource = azure_native.network.HubRouteTable("hubRouteTableResource",
    resource_group_name="string",
    virtual_hub_name="string",
    id="string",
    labels=["string"],
    name="string",
    route_table_name="string",
    routes=[{
        "destination_type": "string",
        "destinations": ["string"],
        "name": "string",
        "next_hop": "string",
        "next_hop_type": "string",
    }])
Copy
const hubRouteTableResource = new azure_native.network.HubRouteTable("hubRouteTableResource", {
    resourceGroupName: "string",
    virtualHubName: "string",
    id: "string",
    labels: ["string"],
    name: "string",
    routeTableName: "string",
    routes: [{
        destinationType: "string",
        destinations: ["string"],
        name: "string",
        nextHop: "string",
        nextHopType: "string",
    }],
});
Copy
type: azure-native:network:HubRouteTable
properties:
    id: string
    labels:
        - string
    name: string
    resourceGroupName: string
    routeTableName: string
    routes:
        - destinationType: string
          destinations:
            - string
          name: string
          nextHop: string
          nextHopType: string
    virtualHubName: string
Copy

HubRouteTable Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The HubRouteTable resource accepts the following input properties:

ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The resource group name of the VirtualHub.
VirtualHubName
This property is required.
Changes to this property will trigger replacement.
string
The name of the VirtualHub.
Id string
Resource ID.
Labels List<string>
List of labels associated with this route table.
Name string
The name of the resource that is unique within a resource group. This name can be used to access the resource.
RouteTableName Changes to this property will trigger replacement. string
The name of the RouteTable.
Routes List<Pulumi.AzureNative.Network.Inputs.HubRoute>
List of all routes.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The resource group name of the VirtualHub.
VirtualHubName
This property is required.
Changes to this property will trigger replacement.
string
The name of the VirtualHub.
Id string
Resource ID.
Labels []string
List of labels associated with this route table.
Name string
The name of the resource that is unique within a resource group. This name can be used to access the resource.
RouteTableName Changes to this property will trigger replacement. string
The name of the RouteTable.
Routes []HubRouteArgs
List of all routes.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The resource group name of the VirtualHub.
virtualHubName
This property is required.
Changes to this property will trigger replacement.
String
The name of the VirtualHub.
id String
Resource ID.
labels List<String>
List of labels associated with this route table.
name String
The name of the resource that is unique within a resource group. This name can be used to access the resource.
routeTableName Changes to this property will trigger replacement. String
The name of the RouteTable.
routes List<HubRoute>
List of all routes.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The resource group name of the VirtualHub.
virtualHubName
This property is required.
Changes to this property will trigger replacement.
string
The name of the VirtualHub.
id string
Resource ID.
labels string[]
List of labels associated with this route table.
name string
The name of the resource that is unique within a resource group. This name can be used to access the resource.
routeTableName Changes to this property will trigger replacement. string
The name of the RouteTable.
routes HubRoute[]
List of all routes.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The resource group name of the VirtualHub.
virtual_hub_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the VirtualHub.
id str
Resource ID.
labels Sequence[str]
List of labels associated with this route table.
name str
The name of the resource that is unique within a resource group. This name can be used to access the resource.
route_table_name Changes to this property will trigger replacement. str
The name of the RouteTable.
routes Sequence[HubRouteArgs]
List of all routes.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The resource group name of the VirtualHub.
virtualHubName
This property is required.
Changes to this property will trigger replacement.
String
The name of the VirtualHub.
id String
Resource ID.
labels List<String>
List of labels associated with this route table.
name String
The name of the resource that is unique within a resource group. This name can be used to access the resource.
routeTableName Changes to this property will trigger replacement. String
The name of the RouteTable.
routes List<Property Map>
List of all routes.

Outputs

All input properties are implicitly available as output properties. Additionally, the HubRouteTable resource produces the following output properties:

AssociatedConnections List<string>
List of all connections associated with this route table.
AzureApiVersion string
The Azure API version of the resource.
Etag string
A unique read-only string that changes whenever the resource is updated.
Id string
The provider-assigned unique ID for this managed resource.
PropagatingConnections List<string>
List of all connections that advertise to this route table.
ProvisioningState string
The provisioning state of the RouteTable resource.
Type string
Resource type.
AssociatedConnections []string
List of all connections associated with this route table.
AzureApiVersion string
The Azure API version of the resource.
Etag string
A unique read-only string that changes whenever the resource is updated.
Id string
The provider-assigned unique ID for this managed resource.
PropagatingConnections []string
List of all connections that advertise to this route table.
ProvisioningState string
The provisioning state of the RouteTable resource.
Type string
Resource type.
associatedConnections List<String>
List of all connections associated with this route table.
azureApiVersion String
The Azure API version of the resource.
etag String
A unique read-only string that changes whenever the resource is updated.
id String
The provider-assigned unique ID for this managed resource.
propagatingConnections List<String>
List of all connections that advertise to this route table.
provisioningState String
The provisioning state of the RouteTable resource.
type String
Resource type.
associatedConnections string[]
List of all connections associated with this route table.
azureApiVersion string
The Azure API version of the resource.
etag string
A unique read-only string that changes whenever the resource is updated.
id string
The provider-assigned unique ID for this managed resource.
propagatingConnections string[]
List of all connections that advertise to this route table.
provisioningState string
The provisioning state of the RouteTable resource.
type string
Resource type.
associated_connections Sequence[str]
List of all connections associated with this route table.
azure_api_version str
The Azure API version of the resource.
etag str
A unique read-only string that changes whenever the resource is updated.
id str
The provider-assigned unique ID for this managed resource.
propagating_connections Sequence[str]
List of all connections that advertise to this route table.
provisioning_state str
The provisioning state of the RouteTable resource.
type str
Resource type.
associatedConnections List<String>
List of all connections associated with this route table.
azureApiVersion String
The Azure API version of the resource.
etag String
A unique read-only string that changes whenever the resource is updated.
id String
The provider-assigned unique ID for this managed resource.
propagatingConnections List<String>
List of all connections that advertise to this route table.
provisioningState String
The provisioning state of the RouteTable resource.
type String
Resource type.

Supporting Types

HubRoute
, HubRouteArgs

DestinationType This property is required. string
The type of destinations (eg: CIDR, ResourceId, Service).
Destinations This property is required. List<string>
List of all destinations.
Name This property is required. string
The name of the Route that is unique within a RouteTable. This name can be used to access this route.
NextHop This property is required. string
NextHop resource ID.
NextHopType This property is required. string
The type of next hop (eg: ResourceId).
DestinationType This property is required. string
The type of destinations (eg: CIDR, ResourceId, Service).
Destinations This property is required. []string
List of all destinations.
Name This property is required. string
The name of the Route that is unique within a RouteTable. This name can be used to access this route.
NextHop This property is required. string
NextHop resource ID.
NextHopType This property is required. string
The type of next hop (eg: ResourceId).
destinationType This property is required. String
The type of destinations (eg: CIDR, ResourceId, Service).
destinations This property is required. List<String>
List of all destinations.
name This property is required. String
The name of the Route that is unique within a RouteTable. This name can be used to access this route.
nextHop This property is required. String
NextHop resource ID.
nextHopType This property is required. String
The type of next hop (eg: ResourceId).
destinationType This property is required. string
The type of destinations (eg: CIDR, ResourceId, Service).
destinations This property is required. string[]
List of all destinations.
name This property is required. string
The name of the Route that is unique within a RouteTable. This name can be used to access this route.
nextHop This property is required. string
NextHop resource ID.
nextHopType This property is required. string
The type of next hop (eg: ResourceId).
destination_type This property is required. str
The type of destinations (eg: CIDR, ResourceId, Service).
destinations This property is required. Sequence[str]
List of all destinations.
name This property is required. str
The name of the Route that is unique within a RouteTable. This name can be used to access this route.
next_hop This property is required. str
NextHop resource ID.
next_hop_type This property is required. str
The type of next hop (eg: ResourceId).
destinationType This property is required. String
The type of destinations (eg: CIDR, ResourceId, Service).
destinations This property is required. List<String>
List of all destinations.
name This property is required. String
The name of the Route that is unique within a RouteTable. This name can be used to access this route.
nextHop This property is required. String
NextHop resource ID.
nextHopType This property is required. String
The type of next hop (eg: ResourceId).

HubRouteResponse
, HubRouteResponseArgs

DestinationType This property is required. string
The type of destinations (eg: CIDR, ResourceId, Service).
Destinations This property is required. List<string>
List of all destinations.
Name This property is required. string
The name of the Route that is unique within a RouteTable. This name can be used to access this route.
NextHop This property is required. string
NextHop resource ID.
NextHopType This property is required. string
The type of next hop (eg: ResourceId).
DestinationType This property is required. string
The type of destinations (eg: CIDR, ResourceId, Service).
Destinations This property is required. []string
List of all destinations.
Name This property is required. string
The name of the Route that is unique within a RouteTable. This name can be used to access this route.
NextHop This property is required. string
NextHop resource ID.
NextHopType This property is required. string
The type of next hop (eg: ResourceId).
destinationType This property is required. String
The type of destinations (eg: CIDR, ResourceId, Service).
destinations This property is required. List<String>
List of all destinations.
name This property is required. String
The name of the Route that is unique within a RouteTable. This name can be used to access this route.
nextHop This property is required. String
NextHop resource ID.
nextHopType This property is required. String
The type of next hop (eg: ResourceId).
destinationType This property is required. string
The type of destinations (eg: CIDR, ResourceId, Service).
destinations This property is required. string[]
List of all destinations.
name This property is required. string
The name of the Route that is unique within a RouteTable. This name can be used to access this route.
nextHop This property is required. string
NextHop resource ID.
nextHopType This property is required. string
The type of next hop (eg: ResourceId).
destination_type This property is required. str
The type of destinations (eg: CIDR, ResourceId, Service).
destinations This property is required. Sequence[str]
List of all destinations.
name This property is required. str
The name of the Route that is unique within a RouteTable. This name can be used to access this route.
next_hop This property is required. str
NextHop resource ID.
next_hop_type This property is required. str
The type of next hop (eg: ResourceId).
destinationType This property is required. String
The type of destinations (eg: CIDR, ResourceId, Service).
destinations This property is required. List<String>
List of all destinations.
name This property is required. String
The name of the Route that is unique within a RouteTable. This name can be used to access this route.
nextHop This property is required. String
NextHop resource ID.
nextHopType This property is required. String
The type of next hop (eg: ResourceId).

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:network:HubRouteTable hubRouteTable1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi