azure-native.network.HubRouteTable
Explore with Pulumi AI
RouteTable resource in a virtual hub. Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2020-11-01.
Other available API versions: 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01, 2024-03-01.
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",
});
});
package main
import (
network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
"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
})
}
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());
}
}
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")
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
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 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.
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",
},
},
});
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"),
},
},
})
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());
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=[{
"destinationType": "string",
"destinations": ["string"],
"name": "string",
"nextHop": "string",
"nextHopType": "string",
}])
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",
}],
});
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
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:
- Resource
Group stringName - The resource group name of the VirtualHub.
- Virtual
Hub stringName - 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.
- Route
Table stringName - The name of the RouteTable.
- Routes
List<Pulumi.
Azure Native. Network. Inputs. Hub Route> - List of all routes.
- Resource
Group stringName - The resource group name of the VirtualHub.
- Virtual
Hub stringName - 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.
- Route
Table stringName - The name of the RouteTable.
- Routes
[]Hub
Route Args - List of all routes.
- resource
Group StringName - The resource group name of the VirtualHub.
- virtual
Hub StringName - 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.
- route
Table StringName - The name of the RouteTable.
- routes
List<Hub
Route> - List of all routes.
- resource
Group stringName - The resource group name of the VirtualHub.
- virtual
Hub stringName - 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.
- route
Table stringName - The name of the RouteTable.
- routes
Hub
Route[] - List of all routes.
- resource_
group_ strname - The resource group name of the VirtualHub.
- virtual_
hub_ strname - 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_ strname - The name of the RouteTable.
- routes
Sequence[Hub
Route Args] - List of all routes.
- resource
Group StringName - The resource group name of the VirtualHub.
- virtual
Hub StringName - 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.
- route
Table StringName - 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:
- Associated
Connections 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.
- Propagating
Connections List<string> - List of all connections that advertise to this route table.
- Provisioning
State string - The provisioning state of the RouteTable resource.
- Type string
- Resource type.
- Associated
Connections []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.
- Propagating
Connections []string - List of all connections that advertise to this route table.
- Provisioning
State string - The provisioning state of the RouteTable resource.
- Type string
- Resource type.
- associated
Connections 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.
- propagating
Connections List<String> - List of all connections that advertise to this route table.
- provisioning
State String - The provisioning state of the RouteTable resource.
- type String
- Resource type.
- associated
Connections 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.
- propagating
Connections string[] - List of all connections that advertise to this route table.
- provisioning
State 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.
- associated
Connections 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.
- propagating
Connections List<String> - List of all connections that advertise to this route table.
- provisioning
State String - The provisioning state of the RouteTable resource.
- type String
- Resource type.
Supporting Types
HubRoute, HubRouteArgs
- Destination
Type 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.
- Next
Hop string - NextHop resource ID.
- Next
Hop stringType - The type of next hop (eg: ResourceId).
- Destination
Type 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.
- Next
Hop string - NextHop resource ID.
- Next
Hop stringType - The type of next hop (eg: ResourceId).
- destination
Type 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.
- next
Hop String - NextHop resource ID.
- next
Hop StringType - The type of next hop (eg: ResourceId).
- destination
Type 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.
- next
Hop string - NextHop resource ID.
- next
Hop stringType - 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_ strtype - The type of next hop (eg: ResourceId).
- destination
Type 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.
- next
Hop String - NextHop resource ID.
- next
Hop StringType - The type of next hop (eg: ResourceId).
HubRouteResponse, HubRouteResponseArgs
- Destination
Type 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.
- Next
Hop string - NextHop resource ID.
- Next
Hop stringType - The type of next hop (eg: ResourceId).
- Destination
Type 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.
- Next
Hop string - NextHop resource ID.
- Next
Hop stringType - The type of next hop (eg: ResourceId).
- destination
Type 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.
- next
Hop String - NextHop resource ID.
- next
Hop StringType - The type of next hop (eg: ResourceId).
- destination
Type 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.
- next
Hop string - NextHop resource ID.
- next
Hop stringType - 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_ strtype - The type of next hop (eg: ResourceId).
- destination
Type 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.
- next
Hop String - NextHop resource ID.
- next
Hop StringType - 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}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0