Skip to content

Data Source: azurermLocalNetworkGateway

Use this data source to access information about an existing Local Network Gateway.

Example 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 dataAzurermLocalNetworkGatewayExample =
  new azurerm.dataAzurermLocalNetworkGateway.DataAzurermLocalNetworkGateway(
    this,
    "example",
    {
      name: "existing-local-network-gateway",
      resource_group_name: "existing-resources",
    }
  );
new cdktf.TerraformOutput(this, "id", {
  value: dataAzurermLocalNetworkGatewayExample.id,
});

Arguments Reference

The following arguments are supported:

  • name - (Required) The name of the Local Network Gateway.

  • resourceGroupName - (Required) The name of the Resource Group where the Local Network Gateway exists.

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

  • id - The ID of the Local Network Gateway.

  • location - The Azure Region where the Local Network Gateway exists.

  • addressSpace - The list of string CIDRs representing the address spaces the gateway exposes.

  • bgpSettings - A bgpSettings block as defined below containing the Local Network Gateway's BGP speaker settings.

  • gatewayAddress - The gateway IP address the Local Network Gateway uses.

  • gatewayFqdn - The gateway FQDN the Local Network Gateway uses.

  • tags - A mapping of tags assigned to the Local Network Gateway.


bgpSettings exports the following:

  • asn - The BGP speaker's ASN.

  • bgpPeeringAddress - The BGP peering address and BGP identifier of this BGP speaker.

  • peerWeight - The weight added to routes learned from this BGP speaker.

Timeouts

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

  • read - (Defaults to 5 minutes) Used when retrieving the Local Network Gateway.