We recommend using Azure Native.
Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi
azure.network.getVpnGateway
Explore with Pulumi AI
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)
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
})
}
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 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}
Using getVpnGateway
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getVpnGateway(args: GetVpnGatewayArgs, opts?: InvokeOptions): Promise<GetVpnGatewayResult>
function getVpnGatewayOutput(args: GetVpnGatewayOutputArgs, opts?: InvokeOptions): Output<GetVpnGatewayResult>
def get_vpn_gateway(name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetVpnGatewayResult
def get_vpn_gateway_output(name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVpnGatewayResult]
func LookupVpnGateway(ctx *Context, args *LookupVpnGatewayArgs, opts ...InvokeOption) (*LookupVpnGatewayResult, error)
func LookupVpnGatewayOutput(ctx *Context, args *LookupVpnGatewayOutputArgs, opts ...InvokeOption) LookupVpnGatewayResultOutput
> Note: This function is named LookupVpnGateway
in the Go SDK.
public static class GetVpnGateway
{
public static Task<GetVpnGatewayResult> InvokeAsync(GetVpnGatewayArgs args, InvokeOptions? opts = null)
public static Output<GetVpnGatewayResult> Invoke(GetVpnGatewayInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetVpnGatewayResult> getVpnGateway(GetVpnGatewayArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azure:network/getVpnGateway:getVpnGateway
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- The Name of the VPN Gateway.
- Resource
Group stringName - The name of the Resource Group where the VPN Gateway exists.
- Name string
- The Name of the VPN Gateway.
- Resource
Group stringName - The name of the Resource Group where the VPN Gateway exists.
- name String
- The Name of the VPN Gateway.
- resource
Group StringName - The name of the Resource Group where the VPN Gateway exists.
- name string
- The Name of the VPN Gateway.
- resource
Group stringName - The name of the Resource Group where the VPN Gateway exists.
- name str
- The Name of the VPN Gateway.
- resource_
group_ strname - The name of the Resource Group where the VPN Gateway exists.
- name String
- The Name of the VPN Gateway.
- resource
Group StringName - The name of the Resource Group where the VPN Gateway exists.
getVpnGateway Result
The following output properties are available:
- Bgp
Settings List<GetVpn Gateway Bgp Setting> - A
bgp_settings
block as defined below. - Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- The Azure location where the VPN Gateway exists.
- Name string
- Resource
Group stringName - Scale
Unit int - The Scale Unit of this VPN Gateway.
- Dictionary<string, string>
- A mapping of tags assigned to the VPN Gateway.
- Virtual
Hub stringId - The ID of the Virtual Hub within which this VPN Gateway has been created.
- Bgp
Settings []GetVpn Gateway Bgp Setting - A
bgp_settings
block as defined below. - Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- The Azure location where the VPN Gateway exists.
- Name string
- Resource
Group stringName - Scale
Unit int - The Scale Unit of this VPN Gateway.
- map[string]string
- A mapping of tags assigned to the VPN Gateway.
- Virtual
Hub stringId - The ID of the Virtual Hub within which this VPN Gateway has been created.
- bgp
Settings List<GetVpn Gateway Bgp Setting> - A
bgp_settings
block as defined below. - id String
- The provider-assigned unique ID for this managed resource.
- location String
- The Azure location where the VPN Gateway exists.
- name String
- resource
Group StringName - scale
Unit Integer - The Scale Unit of this VPN Gateway.
- Map<String,String>
- A mapping of tags assigned to the VPN Gateway.
- virtual
Hub StringId - The ID of the Virtual Hub within which this VPN Gateway has been created.
- bgp
Settings GetVpn Gateway Bgp Setting[] - A
bgp_settings
block as defined below. - id string
- The provider-assigned unique ID for this managed resource.
- location string
- The Azure location where the VPN Gateway exists.
- name string
- resource
Group stringName - scale
Unit number - The Scale Unit of this VPN Gateway.
- {[key: string]: string}
- A mapping of tags assigned to the VPN Gateway.
- virtual
Hub stringId - The ID of the Virtual Hub within which this VPN Gateway has been created.
- bgp_
settings Sequence[GetVpn Gateway Bgp Setting] - A
bgp_settings
block as defined below. - id str
- The provider-assigned unique ID for this managed resource.
- location str
- The Azure location where the VPN Gateway exists.
- name str
- resource_
group_ strname - scale_
unit int - The Scale Unit of this VPN Gateway.
- Mapping[str, str]
- A mapping of tags assigned to the VPN Gateway.
- virtual_
hub_ strid - The ID of the Virtual Hub within which this VPN Gateway has been created.
- bgp
Settings List<Property Map> - A
bgp_settings
block as defined below. - id String
- The provider-assigned unique ID for this managed resource.
- location String
- The Azure location where the VPN Gateway exists.
- name String
- resource
Group StringName - scale
Unit Number - The Scale Unit of this VPN Gateway.
- Map<String>
- A mapping of tags assigned to the VPN Gateway.
- virtual
Hub StringId - The ID of the Virtual Hub within which this VPN Gateway has been created.
Supporting Types
GetVpnGatewayBgpSetting
- Asn int
- The ASN of the BGP Speaker.
- Bgp
Peering stringAddress - The Address which should be used for the BGP Peering.
- Instance0Bgp
Peering List<GetAddresses Vpn Gateway Bgp Setting Instance0Bgp Peering Address> - an
instance_bgp_peering_address
block as defined below. - Instance1Bgp
Peering List<GetAddresses Vpn Gateway Bgp Setting Instance1Bgp Peering Address> - an
instance_bgp_peering_address
block as defined below. - Peer
Weight int - The weight added to Routes learned from this BGP Speaker.
- Asn int
- The ASN of the BGP Speaker.
- Bgp
Peering stringAddress - The Address which should be used for the BGP Peering.
- Instance0Bgp
Peering []GetAddresses Vpn Gateway Bgp Setting Instance0Bgp Peering Address - an
instance_bgp_peering_address
block as defined below. - Instance1Bgp
Peering []GetAddresses Vpn Gateway Bgp Setting Instance1Bgp Peering Address - an
instance_bgp_peering_address
block as defined below. - Peer
Weight int - The weight added to Routes learned from this BGP Speaker.
- asn Integer
- The ASN of the BGP Speaker.
- bgp
Peering StringAddress - The Address which should be used for the BGP Peering.
- instance0Bgp
Peering List<GetAddresses Vpn Gateway Bgp Setting Instance0Bgp Peering Address> - an
instance_bgp_peering_address
block as defined below. - instance1Bgp
Peering List<GetAddresses Vpn Gateway Bgp Setting Instance1Bgp Peering Address> - an
instance_bgp_peering_address
block as defined below. - peer
Weight Integer - The weight added to Routes learned from this BGP Speaker.
- asn number
- The ASN of the BGP Speaker.
- bgp
Peering stringAddress - The Address which should be used for the BGP Peering.
- instance0Bgp
Peering GetAddresses Vpn Gateway Bgp Setting Instance0Bgp Peering Address[] - an
instance_bgp_peering_address
block as defined below. - instance1Bgp
Peering GetAddresses Vpn Gateway Bgp Setting Instance1Bgp Peering Address[] - an
instance_bgp_peering_address
block as defined below. - peer
Weight number - The weight added to Routes learned from this BGP Speaker.
- asn int
- The ASN of the BGP Speaker.
- bgp_
peering_ straddress - The Address which should be used for the BGP Peering.
- instance0_
bgp_ Sequence[Getpeering_ addresses Vpn Gateway Bgp Setting Instance0Bgp Peering Address] - an
instance_bgp_peering_address
block as defined below. - instance1_
bgp_ Sequence[Getpeering_ addresses Vpn Gateway Bgp Setting Instance1Bgp Peering Address] - an
instance_bgp_peering_address
block as defined below. - peer_
weight int - The weight added to Routes learned from this BGP Speaker.
- asn Number
- The ASN of the BGP Speaker.
- bgp
Peering StringAddress - The Address which should be used for the BGP Peering.
- instance0Bgp
Peering List<Property Map>Addresses - an
instance_bgp_peering_address
block as defined below. - instance1Bgp
Peering List<Property Map>Addresses - an
instance_bgp_peering_address
block as defined below. - peer
Weight Number - The weight added to Routes learned from this BGP Speaker.
GetVpnGatewayBgpSettingInstance0BgpPeeringAddress
- Custom
Ips List<string> - A list of custom BGP peering addresses to assigned to this instance.
- Default
Ips List<string> - The list of default BGP peering addresses which belong to the pre-defined VPN Gateway IP configuration.
- Ip
Configuration stringId - The pre-defined id of VPN Gateway IP Configuration.
- Tunnel
Ips List<string> - The list of tunnel public IP addresses which belong to the pre-defined VPN Gateway IP configuration.
- Custom
Ips []string - A list of custom BGP peering addresses to assigned to this instance.
- Default
Ips []string - The list of default BGP peering addresses which belong to the pre-defined VPN Gateway IP configuration.
- Ip
Configuration stringId - The pre-defined id of VPN Gateway IP Configuration.
- Tunnel
Ips []string - The list of tunnel public IP addresses which belong to the pre-defined VPN Gateway IP configuration.
- custom
Ips List<String> - A list of custom BGP peering addresses to assigned to this instance.
- default
Ips List<String> - The list of default BGP peering addresses which belong to the pre-defined VPN Gateway IP configuration.
- ip
Configuration StringId - The pre-defined id of VPN Gateway IP Configuration.
- tunnel
Ips List<String> - The list of tunnel public IP addresses which belong to the pre-defined VPN Gateway IP configuration.
- custom
Ips string[] - A list of custom BGP peering addresses to assigned to this instance.
- default
Ips string[] - The list of default BGP peering addresses which belong to the pre-defined VPN Gateway IP configuration.
- ip
Configuration stringId - The pre-defined id of VPN Gateway IP Configuration.
- tunnel
Ips string[] - The list of tunnel public IP addresses which belong to the pre-defined VPN Gateway IP configuration.
- custom_
ips Sequence[str] - A list of custom BGP peering addresses to assigned to this instance.
- default_
ips Sequence[str] - The list of default BGP peering addresses which belong to the pre-defined VPN Gateway IP configuration.
- ip_
configuration_ strid - The pre-defined id of VPN Gateway IP Configuration.
- tunnel_
ips Sequence[str] - The list of tunnel public IP addresses which belong to the pre-defined VPN Gateway IP configuration.
- custom
Ips List<String> - A list of custom BGP peering addresses to assigned to this instance.
- default
Ips List<String> - The list of default BGP peering addresses which belong to the pre-defined VPN Gateway IP configuration.
- ip
Configuration StringId - The pre-defined id of VPN Gateway IP Configuration.
- tunnel
Ips List<String> - The list of tunnel public IP addresses which belong to the pre-defined VPN Gateway IP configuration.
GetVpnGatewayBgpSettingInstance1BgpPeeringAddress
- Custom
Ips List<string> - A list of custom BGP peering addresses to assigned to this instance.
- Default
Ips List<string> - The list of default BGP peering addresses which belong to the pre-defined VPN Gateway IP configuration.
- Ip
Configuration stringId - The pre-defined id of VPN Gateway IP Configuration.
- Tunnel
Ips List<string> - The list of tunnel public IP addresses which belong to the pre-defined VPN Gateway IP configuration.
- Custom
Ips []string - A list of custom BGP peering addresses to assigned to this instance.
- Default
Ips []string - The list of default BGP peering addresses which belong to the pre-defined VPN Gateway IP configuration.
- Ip
Configuration stringId - The pre-defined id of VPN Gateway IP Configuration.
- Tunnel
Ips []string - The list of tunnel public IP addresses which belong to the pre-defined VPN Gateway IP configuration.
- custom
Ips List<String> - A list of custom BGP peering addresses to assigned to this instance.
- default
Ips List<String> - The list of default BGP peering addresses which belong to the pre-defined VPN Gateway IP configuration.
- ip
Configuration StringId - The pre-defined id of VPN Gateway IP Configuration.
- tunnel
Ips List<String> - The list of tunnel public IP addresses which belong to the pre-defined VPN Gateway IP configuration.
- custom
Ips string[] - A list of custom BGP peering addresses to assigned to this instance.
- default
Ips string[] - The list of default BGP peering addresses which belong to the pre-defined VPN Gateway IP configuration.
- ip
Configuration stringId - The pre-defined id of VPN Gateway IP Configuration.
- tunnel
Ips string[] - The list of tunnel public IP addresses which belong to the pre-defined VPN Gateway IP configuration.
- custom_
ips Sequence[str] - A list of custom BGP peering addresses to assigned to this instance.
- default_
ips Sequence[str] - The list of default BGP peering addresses which belong to the pre-defined VPN Gateway IP configuration.
- ip_
configuration_ strid - The pre-defined id of VPN Gateway IP Configuration.
- tunnel_
ips Sequence[str] - The list of tunnel public IP addresses which belong to the pre-defined VPN Gateway IP configuration.
- custom
Ips List<String> - A list of custom BGP peering addresses to assigned to this instance.
- default
Ips List<String> - The list of default BGP peering addresses which belong to the pre-defined VPN Gateway IP configuration.
- ip
Configuration StringId - The pre-defined id of VPN Gateway IP Configuration.
- tunnel
Ips List<String> - The list of tunnel public IP addresses which belong to the pre-defined VPN Gateway IP configuration.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.