getVpnGateway

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

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.network.getVpnGateway({
name: "existing-local-vpn_gateway",
resourceGroupName: "existing-vpn_gateway",
});
export const azurermVpnGatewayId = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.network.get_vpn_gateway(name="existing-local-vpn_gateway",
resource_group_name="existing-vpn_gateway")
pulumi.export("azurermVpnGatewayId", example.id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.Network.GetVpnGateway.Invoke(new()
{
Name = "existing-local-vpn_gateway",
ResourceGroupName = "existing-vpn_gateway",
});
return new Dictionary<string, object?>
{
["azurermVpnGatewayId"] = example.Apply(getVpnGatewayResult => getVpnGatewayResult.Id),
};
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := network.LookupVpnGateway(ctx, &network.LookupVpnGatewayArgs{
Name: "existing-local-vpn_gateway",
ResourceGroupName: "existing-vpn_gateway",
}, nil)
if err != nil {
return err
}
ctx.Export("azurermVpnGatewayId", example.Id)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.network.NetworkFunctions;
import com.pulumi.azure.network.inputs.GetVpnGatewayArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = NetworkFunctions.getVpnGateway(GetVpnGatewayArgs.builder()
.name("existing-local-vpn_gateway")
.resourceGroupName("existing-vpn_gateway")
.build());
ctx.export("azurermVpnGatewayId", example.applyValue(getVpnGatewayResult -> getVpnGatewayResult.id()));
}
}
variables:
example:
fn::invoke:
function: azure:network:getVpnGateway
arguments:
name: existing-local-vpn_gateway
resourceGroupName: existing-vpn_gateway
outputs:
azurermVpnGatewayId: ${example.id}

Return

A collection of values returned by getVpnGateway.

Parameters

argument

A collection of arguments for invoking getVpnGateway.


suspend fun getVpnGateway(name: String, resourceGroupName: String): GetVpnGatewayResult

Return

A collection of values returned by getVpnGateway.

Parameters

name

The Name of the VPN Gateway.

resourceGroupName

The name of the Resource Group where the VPN Gateway exists.

See also


Return

A collection of values returned by getVpnGateway.

Parameters

argument

Builder for com.pulumi.azure.network.kotlin.inputs.GetVpnGatewayPlainArgs.

See also