GetVirtualNetworkGateway

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

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Azure.Network.GetVirtualNetworkGateway.InvokeAsync(new Azure.Network.GetVirtualNetworkGatewayArgs
        {
            Name = "production",
            ResourceGroupName = "networking",
        }));
        this.VirtualNetworkGatewayId = example.Apply(example => example.Id);
    }

    [Output("virtualNetworkGatewayId")]
    public Output<string> VirtualNetworkGatewayId { get; set; }
}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/network"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        example, err := network.LookupVirtualNetworkGateway(ctx, &network.LookupVirtualNetworkGatewayArgs{
            Name:              "production",
            ResourceGroupName: "networking",
        }, nil)
        if err != nil {
            return err
        }
        ctx.Export("virtualNetworkGatewayId", example.Id)
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example = azure.network.get_virtual_network_gateway(name="production",
    resource_group_name="networking")
pulumi.export("virtualNetworkGatewayId", example.id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.network.getVirtualNetworkGateway({
    name: "production",
    resourceGroupName: "networking",
});
export const virtualNetworkGatewayId = example.then(example => example.id);

Using GetVirtualNetworkGateway

function getVirtualNetworkGateway(args: GetVirtualNetworkGatewayArgs, opts?: InvokeOptions): Promise<GetVirtualNetworkGatewayResult>
function  get_virtual_network_gateway(name=None, resource_group_name=None, opts=None)
func LookupVirtualNetworkGateway(ctx *Context, args *LookupVirtualNetworkGatewayArgs, opts ...InvokeOption) (*LookupVirtualNetworkGatewayResult, error)

Note: This function is named LookupVirtualNetworkGateway in the Go SDK.

public static class GetVirtualNetworkGateway {
    public static Task<GetVirtualNetworkGatewayResult> InvokeAsync(GetVirtualNetworkGatewayArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

Specifies the name of the Virtual Network Gateway.

ResourceGroupName string

Specifies the name of the resource group the Virtual Network Gateway is located in.

Name string

Specifies the name of the Virtual Network Gateway.

ResourceGroupName string

Specifies the name of the resource group the Virtual Network Gateway is located in.

name string

Specifies the name of the Virtual Network Gateway.

resourceGroupName string

Specifies the name of the resource group the Virtual Network Gateway is located in.

name str

Specifies the name of the Virtual Network Gateway.

resource_group_name str

Specifies the name of the resource group the Virtual Network Gateway is located in.

GetVirtualNetworkGateway Result

The following output properties are available:

ActiveActive bool

Is this an Active-Active Gateway?

BgpSettings List<GetVirtualNetworkGatewayBgpSetting>
DefaultLocalNetworkGatewayId string

The ID of the local network gateway through which outbound Internet traffic from the virtual network in which the gateway is created will be routed (forced tunneling). Refer to the Azure documentation on forced tunneling.

EnableBgp bool

Will BGP (Border Gateway Protocol) will be enabled for this Virtual Network Gateway.

Generation string

The Generation of the Virtual Network Gateway.

Id string

The provider-assigned unique ID for this managed resource.

IpConfigurations List<GetVirtualNetworkGatewayIpConfiguration>

One or two ip_configuration blocks documented below.

Location string

The location/region where the Virtual Network Gateway is located.

Name string

The user-defined name of the revoked certificate.

ResourceGroupName string
Sku string

Configuration of the size and capacity of the Virtual Network Gateway.

Tags Dictionary<string, string>

A mapping of tags assigned to the resource.

Type string

The type of the Virtual Network Gateway.

VpnClientConfigurations List<GetVirtualNetworkGatewayVpnClientConfiguration>

A vpn_client_configuration block which is documented below.

VpnType string

The routing type of the Virtual Network Gateway.

ActiveActive bool

Is this an Active-Active Gateway?

BgpSettings []GetVirtualNetworkGatewayBgpSetting
DefaultLocalNetworkGatewayId string

The ID of the local network gateway through which outbound Internet traffic from the virtual network in which the gateway is created will be routed (forced tunneling). Refer to the Azure documentation on forced tunneling.

EnableBgp bool

Will BGP (Border Gateway Protocol) will be enabled for this Virtual Network Gateway.

Generation string

The Generation of the Virtual Network Gateway.

Id string

The provider-assigned unique ID for this managed resource.

IpConfigurations []GetVirtualNetworkGatewayIpConfiguration

One or two ip_configuration blocks documented below.

Location string

The location/region where the Virtual Network Gateway is located.

Name string

The user-defined name of the revoked certificate.

ResourceGroupName string
Sku string

Configuration of the size and capacity of the Virtual Network Gateway.

Tags map[string]string

A mapping of tags assigned to the resource.

Type string

The type of the Virtual Network Gateway.

VpnClientConfigurations []GetVirtualNetworkGatewayVpnClientConfiguration

A vpn_client_configuration block which is documented below.

VpnType string

The routing type of the Virtual Network Gateway.

activeActive boolean

Is this an Active-Active Gateway?

bgpSettings GetVirtualNetworkGatewayBgpSetting[]
defaultLocalNetworkGatewayId string

The ID of the local network gateway through which outbound Internet traffic from the virtual network in which the gateway is created will be routed (forced tunneling). Refer to the Azure documentation on forced tunneling.

enableBgp boolean

Will BGP (Border Gateway Protocol) will be enabled for this Virtual Network Gateway.

generation string

The Generation of the Virtual Network Gateway.

id string

The provider-assigned unique ID for this managed resource.

ipConfigurations GetVirtualNetworkGatewayIpConfiguration[]

One or two ip_configuration blocks documented below.

location string

The location/region where the Virtual Network Gateway is located.

name string

The user-defined name of the revoked certificate.

resourceGroupName string
sku string

Configuration of the size and capacity of the Virtual Network Gateway.

tags {[key: string]: string}

A mapping of tags assigned to the resource.

type string

The type of the Virtual Network Gateway.

vpnClientConfigurations GetVirtualNetworkGatewayVpnClientConfiguration[]

A vpn_client_configuration block which is documented below.

vpnType string

The routing type of the Virtual Network Gateway.

active_active bool

Is this an Active-Active Gateway?

bgp_settings List[GetVirtualNetworkGatewayBgpSetting]
default_local_network_gateway_id str

The ID of the local network gateway through which outbound Internet traffic from the virtual network in which the gateway is created will be routed (forced tunneling). Refer to the Azure documentation on forced tunneling.

enable_bgp bool

Will BGP (Border Gateway Protocol) will be enabled for this Virtual Network Gateway.

generation str

The Generation of the Virtual Network Gateway.

id str

The provider-assigned unique ID for this managed resource.

ip_configurations List[GetVirtualNetworkGatewayIpConfiguration]

One or two ip_configuration blocks documented below.

location str

The location/region where the Virtual Network Gateway is located.

name str

The user-defined name of the revoked certificate.

resource_group_name str
sku str

Configuration of the size and capacity of the Virtual Network Gateway.

tags Dict[str, str]

A mapping of tags assigned to the resource.

type str

The type of the Virtual Network Gateway.

vpn_client_configurations List[GetVirtualNetworkGatewayVpnClientConfiguration]

A vpn_client_configuration block which is documented below.

vpn_type str

The routing type of the Virtual Network Gateway.

Supporting Types

GetVirtualNetworkGatewayBgpSetting

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Asn int

The Autonomous System Number (ASN) to use as part of the BGP.

PeerWeight int

The weight added to routes which have been learned through BGP peering.

PeeringAddress string

The BGP peer IP address of the virtual network gateway. This address is needed to configure the created gateway as a BGP Peer on the on-premises VPN devices.

Asn int

The Autonomous System Number (ASN) to use as part of the BGP.

PeerWeight int

The weight added to routes which have been learned through BGP peering.

PeeringAddress string

The BGP peer IP address of the virtual network gateway. This address is needed to configure the created gateway as a BGP Peer on the on-premises VPN devices.

asn number

The Autonomous System Number (ASN) to use as part of the BGP.

peerWeight number

The weight added to routes which have been learned through BGP peering.

peeringAddress string

The BGP peer IP address of the virtual network gateway. This address is needed to configure the created gateway as a BGP Peer on the on-premises VPN devices.

asn float

The Autonomous System Number (ASN) to use as part of the BGP.

peerWeight float

The weight added to routes which have been learned through BGP peering.

peeringAddress str

The BGP peer IP address of the virtual network gateway. This address is needed to configure the created gateway as a BGP Peer on the on-premises VPN devices.

GetVirtualNetworkGatewayIpConfiguration

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Name string

Specifies the name of the Virtual Network Gateway.

PrivateIpAddressAllocation string

Defines how the private IP address of the gateways virtual interface is assigned.

PublicIpAddressId string

The ID of the Public IP Address associated with the Virtual Network Gateway.

SubnetId string

The ID of the gateway subnet of a virtual network in which the virtual network gateway will be created. It is mandatory that the associated subnet is named GatewaySubnet. Therefore, each virtual network can contain at most a single Virtual Network Gateway.

Name string

Specifies the name of the Virtual Network Gateway.

PrivateIpAddressAllocation string

Defines how the private IP address of the gateways virtual interface is assigned.

PublicIpAddressId string

The ID of the Public IP Address associated with the Virtual Network Gateway.

SubnetId string

The ID of the gateway subnet of a virtual network in which the virtual network gateway will be created. It is mandatory that the associated subnet is named GatewaySubnet. Therefore, each virtual network can contain at most a single Virtual Network Gateway.

name string

Specifies the name of the Virtual Network Gateway.

privateIpAddressAllocation string

Defines how the private IP address of the gateways virtual interface is assigned.

publicIpAddressId string

The ID of the Public IP Address associated with the Virtual Network Gateway.

subnetId string

The ID of the gateway subnet of a virtual network in which the virtual network gateway will be created. It is mandatory that the associated subnet is named GatewaySubnet. Therefore, each virtual network can contain at most a single Virtual Network Gateway.

name str

Specifies the name of the Virtual Network Gateway.

privateIpAddressAllocation str

Defines how the private IP address of the gateways virtual interface is assigned.

public_ip_address_id str

The ID of the Public IP Address associated with the Virtual Network Gateway.

subnet_id str

The ID of the gateway subnet of a virtual network in which the virtual network gateway will be created. It is mandatory that the associated subnet is named GatewaySubnet. Therefore, each virtual network can contain at most a single Virtual Network Gateway.

GetVirtualNetworkGatewayVpnClientConfiguration

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

AddressSpaces List<string>

The address space out of which ip addresses for vpn clients will be taken. You can provide more than one address space, e.g. in CIDR notation.

RadiusServerAddress string

The address of the Radius server. This setting is incompatible with the use of root_certificate and revoked_certificate.

RadiusServerSecret string

The secret used by the Radius server. This setting is incompatible with the use of root_certificate and revoked_certificate.

RevokedCertificates List<GetVirtualNetworkGatewayVpnClientConfigurationRevokedCertificateArgs>

One or more revoked_certificate blocks which are defined below.

RootCertificates List<GetVirtualNetworkGatewayVpnClientConfigurationRootCertificateArgs>

One or more root_certificate blocks which are defined below. These root certificates are used to sign the client certificate used by the VPN clients to connect to the gateway.

VpnClientProtocols List<string>

List of the protocols supported by the vpn client. The supported values are SSTP, IkeV2 and OpenVPN.

AddressSpaces []string

The address space out of which ip addresses for vpn clients will be taken. You can provide more than one address space, e.g. in CIDR notation.

RadiusServerAddress string

The address of the Radius server. This setting is incompatible with the use of root_certificate and revoked_certificate.

RadiusServerSecret string

The secret used by the Radius server. This setting is incompatible with the use of root_certificate and revoked_certificate.

RevokedCertificates []GetVirtualNetworkGatewayVpnClientConfigurationRevokedCertificate

One or more revoked_certificate blocks which are defined below.

RootCertificates []GetVirtualNetworkGatewayVpnClientConfigurationRootCertificate

One or more root_certificate blocks which are defined below. These root certificates are used to sign the client certificate used by the VPN clients to connect to the gateway.

VpnClientProtocols []string

List of the protocols supported by the vpn client. The supported values are SSTP, IkeV2 and OpenVPN.

addressSpaces string[]

The address space out of which ip addresses for vpn clients will be taken. You can provide more than one address space, e.g. in CIDR notation.

radiusServerAddress string

The address of the Radius server. This setting is incompatible with the use of root_certificate and revoked_certificate.

radiusServerSecret string

The secret used by the Radius server. This setting is incompatible with the use of root_certificate and revoked_certificate.

revokedCertificates GetVirtualNetworkGatewayVpnClientConfigurationRevokedCertificate[]

One or more revoked_certificate blocks which are defined below.

rootCertificates GetVirtualNetworkGatewayVpnClientConfigurationRootCertificate[]

One or more root_certificate blocks which are defined below. These root certificates are used to sign the client certificate used by the VPN clients to connect to the gateway.

vpnClientProtocols string[]

List of the protocols supported by the vpn client. The supported values are SSTP, IkeV2 and OpenVPN.

address_spaces List[str]

The address space out of which ip addresses for vpn clients will be taken. You can provide more than one address space, e.g. in CIDR notation.

radiusServerAddress str

The address of the Radius server. This setting is incompatible with the use of root_certificate and revoked_certificate.

radiusServerSecret str

The secret used by the Radius server. This setting is incompatible with the use of root_certificate and revoked_certificate.

revokedCertificates List[GetVirtualNetworkGatewayVpnClientConfigurationRevokedCertificate]

One or more revoked_certificate blocks which are defined below.

rootCertificates List[GetVirtualNetworkGatewayVpnClientConfigurationRootCertificate]

One or more root_certificate blocks which are defined below. These root certificates are used to sign the client certificate used by the VPN clients to connect to the gateway.

vpnClientProtocols List[str]

List of the protocols supported by the vpn client. The supported values are SSTP, IkeV2 and OpenVPN.

GetVirtualNetworkGatewayVpnClientConfigurationRevokedCertificate

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Name string

Specifies the name of the Virtual Network Gateway.

Thumbprint string
Name string

Specifies the name of the Virtual Network Gateway.

Thumbprint string
name string

Specifies the name of the Virtual Network Gateway.

thumbprint string
name str

Specifies the name of the Virtual Network Gateway.

thumbprint str

GetVirtualNetworkGatewayVpnClientConfigurationRootCertificate

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Name string

Specifies the name of the Virtual Network Gateway.

PublicCertData string

The SHA1 thumbprint of the certificate to be revoked.

Name string

Specifies the name of the Virtual Network Gateway.

PublicCertData string

The SHA1 thumbprint of the certificate to be revoked.

name string

Specifies the name of the Virtual Network Gateway.

publicCertData string

The SHA1 thumbprint of the certificate to be revoked.

name str

Specifies the name of the Virtual Network Gateway.

publicCertData str

The SHA1 thumbprint of the certificate to be revoked.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.