Skip to content

Data Source: azurermVirtualHub

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

Virtual Hub 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 dataAzurermVirtualHubExample =
  new azurerm.dataAzurermVirtualHub.DataAzurermVirtualHub(this, "example", {
    name: "example-hub",
    resource_group_name: "example-resources",
  });
new cdktf.TerraformOutput(this, "virtual_hub_id", {
  value: dataAzurermVirtualHubExample.id,
});

Argument Reference

The following arguments are supported:

  • name - The name of the Virtual Hub.

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

Attributes Reference

The following attributes are exported:

  • location - The Azure Region where the Virtual Hub exists.

  • addressPrefix - The Address Prefix used for this Virtual Hub.

  • tags - A mapping of tags assigned to the Virtual Hub.

  • virtualWanId - The ID of the Virtual WAN within which the Virtual Hub exists.

  • defaultRouteTableId - The ID of the default Route Table in the Virtual Hub.

  • virtualRouterAsn - The Autonomous System Number of the Virtual Hub BGP router.

  • virtualRouterIps - The IP addresses of the Virtual Hub BGP router.

Timeouts

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

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