Skip to content

Data Source: azurermVpnGateway

Use this data source to access information about an existing VPN Gateway within a Virtual Hub.

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 dataAzurermVpnGatewayExample =
  new azurerm.dataAzurermVpnGateway.DataAzurermVpnGateway(this, "example", {
    name: "existing-local-vpn_gateway",
    resource_group_name: "existing-vpn_gateway",
  });
new cdktf.TerraformOutput(this, "azurerm_vpn_gateway_id", {
  value: dataAzurermVpnGatewayExample.id,
});

Argument Reference

  • name - (Required) The Name of the VPN Gateway.

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

Attributes Reference

  • id - The ID of the VPN Gateway.

  • location - The Azure location where the VPN Gateway exists.

  • virtualHubId - The ID of the Virtual Hub within which this VPN Gateway has been created.

  • bgpSettings - A bgpSettings block as defined below.

  • scaleUnit - The Scale Unit of this VPN Gateway.

  • tags - A mapping of tags assigned to the VPN Gateway.


A bgpSettings block exports the following:

  • asn - The ASN of the BGP Speaker.

  • peerWeight - The weight added to Routes learned from this BGP Speaker.

  • instance0BgpPeeringAddress - An instanceBgpPeeringAddress block as defined below.

  • instance1BgpPeeringAddress - An instanceBgpPeeringAddress block as defined below.


A instanceBgpPeeringAddress block exports the following:

  • customIps - A list of custom BGP peering addresses to assigned to this instance.

  • bgpSettings - A bgpSettings block as defined below.


A bgpSettings block exports the following:

  • bgpPeeringAddress - The Address which should be used for the BGP Peering.

  • instance0BgpPeeringAddress - an instanceBgpPeeringAddress block as defined below.

  • instance1BgpPeeringAddress - an instanceBgpPeeringAddress block as defined below.


A instanceBgpPeeringAddress block exports the following:

  • ipConfigurationId - The pre-defined id of VPN Gateway IP Configuration.

  • defaultIps - The list of default BGP peering addresses which belong to the pre-defined VPN Gateway IP configuration.

  • tunnelIps - The list of tunnel public IP addresses which belong to the pre-defined VPN Gateway IP configuration.

Timeouts

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

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