azure-native.network.HubRouteTable

Explore with Pulumi AI

RouteTable resource in a virtual hub. API Version: 2020-11-01.

Example Usage

RouteTablePut

using System.Collections.Generic;
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",
    });

});
package main

import (
	network "github.com/pulumi/pulumi-azure-native/sdk/go/azure/network"
	"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.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
	})
}
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 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(Map.ofEntries(
                Map.entry("destinationType", "CIDR"),
                Map.entry("destinations",                 
                    "10.0.0.0/8",
                    "20.0.0.0/8",
                    "30.0.0.0/8"),
                Map.entry("name", "route1"),
                Map.entry("nextHop", "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/azureFirewalls/azureFirewall1"),
                Map.entry("nextHopType", "ResourceId")
            ))
            .virtualHubName("virtualHub1")
            .build());

    }
}
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=[{
        "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",
    }],
    virtual_hub_name="virtualHub1")
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",
});
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

Create HubRouteTable Resource

new HubRouteTable(name: string, args: HubRouteTableArgs, opts?: CustomResourceOptions);
@overload
def HubRouteTable(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  id: Optional[str] = None,
                  labels: Optional[Sequence[str]] = None,
                  name: Optional[str] = None,
                  resource_group_name: Optional[str] = None,
                  route_table_name: Optional[str] = None,
                  routes: Optional[Sequence[HubRouteArgs]] = None,
                  virtual_hub_name: Optional[str] = None)
@overload
def HubRouteTable(resource_name: str,
                  args: HubRouteTableArgs,
                  opts: Optional[ResourceOptions] = 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.

name string
The unique name of the resource.
args HubRouteTableArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args 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 string
The unique name of the resource.
args HubRouteTableArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args HubRouteTableArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args HubRouteTableArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

The HubRouteTable resource accepts the following input properties:

ResourceGroupName string

The resource group name of the VirtualHub.

VirtualHubName 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 string

The name of the RouteTable.

Routes List<Pulumi.AzureNative.Network.Inputs.HubRouteArgs>

List of all routes.

ResourceGroupName string

The resource group name of the VirtualHub.

VirtualHubName 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 string

The name of the RouteTable.

Routes []HubRouteArgs

List of all routes.

resourceGroupName String

The resource group name of the VirtualHub.

virtualHubName 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 String

The name of the RouteTable.

routes List<HubRouteArgs>

List of all routes.

resourceGroupName string

The resource group name of the VirtualHub.

virtualHubName 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 string

The name of the RouteTable.

routes HubRouteArgs[]

List of all routes.

resource_group_name str

The resource group name of the VirtualHub.

virtual_hub_name 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 str

The name of the RouteTable.

routes Sequence[HubRouteArgs]

List of all routes.

resourceGroupName String

The resource group name of the VirtualHub.

virtualHubName 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 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.

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.

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.

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.

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.

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.

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

DestinationType string

The type of destinations (eg: CIDR, ResourceId, Service).

Destinations List<string>

List of all destinations.

Name string

The name of the Route that is unique within a RouteTable. This name can be used to access this route.

NextHop string

NextHop resource ID.

NextHopType string

The type of next hop (eg: ResourceId).

DestinationType string

The type of destinations (eg: CIDR, ResourceId, Service).

Destinations []string

List of all destinations.

Name string

The name of the Route that is unique within a RouteTable. This name can be used to access this route.

NextHop string

NextHop resource ID.

NextHopType string

The type of next hop (eg: ResourceId).

destinationType String

The type of destinations (eg: CIDR, ResourceId, Service).

destinations List<String>

List of all destinations.

name String

The name of the Route that is unique within a RouteTable. This name can be used to access this route.

nextHop String

NextHop resource ID.

nextHopType String

The type of next hop (eg: ResourceId).

destinationType string

The type of destinations (eg: CIDR, ResourceId, Service).

destinations string[]

List of all destinations.

name string

The name of the Route that is unique within a RouteTable. This name can be used to access this route.

nextHop string

NextHop resource ID.

nextHopType string

The type of next hop (eg: ResourceId).

destination_type str

The type of destinations (eg: CIDR, ResourceId, Service).

destinations Sequence[str]

List of all destinations.

name str

The name of the Route that is unique within a RouteTable. This name can be used to access this route.

next_hop str

NextHop resource ID.

next_hop_type str

The type of next hop (eg: ResourceId).

destinationType String

The type of destinations (eg: CIDR, ResourceId, Service).

destinations List<String>

List of all destinations.

name String

The name of the Route that is unique within a RouteTable. This name can be used to access this route.

nextHop String

NextHop resource ID.

nextHopType String

The type of next hop (eg: ResourceId).

HubRouteResponse

DestinationType string

The type of destinations (eg: CIDR, ResourceId, Service).

Destinations List<string>

List of all destinations.

Name string

The name of the Route that is unique within a RouteTable. This name can be used to access this route.

NextHop string

NextHop resource ID.

NextHopType string

The type of next hop (eg: ResourceId).

DestinationType string

The type of destinations (eg: CIDR, ResourceId, Service).

Destinations []string

List of all destinations.

Name string

The name of the Route that is unique within a RouteTable. This name can be used to access this route.

NextHop string

NextHop resource ID.

NextHopType string

The type of next hop (eg: ResourceId).

destinationType String

The type of destinations (eg: CIDR, ResourceId, Service).

destinations List<String>

List of all destinations.

name String

The name of the Route that is unique within a RouteTable. This name can be used to access this route.

nextHop String

NextHop resource ID.

nextHopType String

The type of next hop (eg: ResourceId).

destinationType string

The type of destinations (eg: CIDR, ResourceId, Service).

destinations string[]

List of all destinations.

name string

The name of the Route that is unique within a RouteTable. This name can be used to access this route.

nextHop string

NextHop resource ID.

nextHopType string

The type of next hop (eg: ResourceId).

destination_type str

The type of destinations (eg: CIDR, ResourceId, Service).

destinations Sequence[str]

List of all destinations.

name str

The name of the Route that is unique within a RouteTable. This name can be used to access this route.

next_hop str

NextHop resource ID.

next_hop_type str

The type of next hop (eg: ResourceId).

destinationType String

The type of destinations (eg: CIDR, ResourceId, Service).

destinations List<String>

List of all destinations.

name String

The name of the Route that is unique within a RouteTable. This name can be used to access this route.

nextHop String

NextHop resource ID.

nextHopType 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/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualHubs/virtualHub1/hubRouteTables/hubRouteTable1 

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0