Skip to content

Data Source: azurermVirtualHubRouteTable

Uses this data source to access information about an existing Virtual Hub Route Table.

Virtual Hub Route Table Usage

import * as cdktf from "cdktf";
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const dataAzurermVirtualHubRouteTableExample =
  new azurerm.dataAzurermVirtualHubRouteTable.DataAzurermVirtualHubRouteTable(
    this,
    "example",
    {
      name: "example-hub-route-table",
      resource_group_name: "example-resources",
      virtual_hub_name: "example-hub-name",
    }
  );
new cdktf.TerraformOutput(this, "virtual_hub_route_table_id", {
  value: dataAzurermVirtualHubRouteTableExample.id,
});

Argument Reference

The following arguments are supported:

  • name - The name of the Virtual Hub Route Table.

  • resourceGroupName - The Name of the Resource Group where the Virtual Hub Route Table exists.

  • virtualHubName - The name which should be used for Virtual Hub Route Table.

Attributes Reference

The following attributes are exported:

  • id - The ID of the Virtual Hub Route Table.

  • virtualHubId - The ID of the Virtual Hub within which this route table is created

  • labels - List of labels associated with this route table.

  • route - A route block as defined below.


An route block exports the following:

  • name - The name which is used for this route.

  • destinations - A list of destination addresses for this route.

  • destinationsType - The type of destinations.

  • nextHop - The next hop's resource ID.

  • nextHopType - The type of next hop.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • read - (Defaults to 5 minutes) Used when retrieving the Virtual Hub.