We recommend using Azure Native.
azure.network.VpnGateway
Explore with Pulumi AI
Manages a VPN Gateway within a Virtual Hub, which enables Site-to-Site communication.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-resources",
location: "West Europe",
});
const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
name: "example-network",
location: example.location,
resourceGroupName: example.name,
addressSpaces: ["10.0.0.0/16"],
});
const exampleVirtualWan = new azure.network.VirtualWan("example", {
name: "example-vwan",
resourceGroupName: example.name,
location: example.location,
});
const exampleVirtualHub = new azure.network.VirtualHub("example", {
name: "example-hub",
resourceGroupName: example.name,
location: example.location,
virtualWanId: exampleVirtualWan.id,
addressPrefix: "10.0.1.0/24",
});
const exampleVpnGateway = new azure.network.VpnGateway("example", {
name: "example-vpng",
location: example.location,
resourceGroupName: example.name,
virtualHubId: exampleVirtualHub.id,
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_virtual_network = azure.network.VirtualNetwork("example",
name="example-network",
location=example.location,
resource_group_name=example.name,
address_spaces=["10.0.0.0/16"])
example_virtual_wan = azure.network.VirtualWan("example",
name="example-vwan",
resource_group_name=example.name,
location=example.location)
example_virtual_hub = azure.network.VirtualHub("example",
name="example-hub",
resource_group_name=example.name,
location=example.location,
virtual_wan_id=example_virtual_wan.id,
address_prefix="10.0.1.0/24")
example_vpn_gateway = azure.network.VpnGateway("example",
name="example-vpng",
location=example.location,
resource_group_name=example.name,
virtual_hub_id=example_virtual_hub.id)
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"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 := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
_, err = network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
Name: pulumi.String("example-network"),
Location: example.Location,
ResourceGroupName: example.Name,
AddressSpaces: pulumi.StringArray{
pulumi.String("10.0.0.0/16"),
},
})
if err != nil {
return err
}
exampleVirtualWan, err := network.NewVirtualWan(ctx, "example", &network.VirtualWanArgs{
Name: pulumi.String("example-vwan"),
ResourceGroupName: example.Name,
Location: example.Location,
})
if err != nil {
return err
}
exampleVirtualHub, err := network.NewVirtualHub(ctx, "example", &network.VirtualHubArgs{
Name: pulumi.String("example-hub"),
ResourceGroupName: example.Name,
Location: example.Location,
VirtualWanId: exampleVirtualWan.ID(),
AddressPrefix: pulumi.String("10.0.1.0/24"),
})
if err != nil {
return err
}
_, err = network.NewVpnGateway(ctx, "example", &network.VpnGatewayArgs{
Name: pulumi.String("example-vpng"),
Location: example.Location,
ResourceGroupName: example.Name,
VirtualHubId: exampleVirtualHub.ID(),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-resources",
Location = "West Europe",
});
var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
{
Name = "example-network",
Location = example.Location,
ResourceGroupName = example.Name,
AddressSpaces = new[]
{
"10.0.0.0/16",
},
});
var exampleVirtualWan = new Azure.Network.VirtualWan("example", new()
{
Name = "example-vwan",
ResourceGroupName = example.Name,
Location = example.Location,
});
var exampleVirtualHub = new Azure.Network.VirtualHub("example", new()
{
Name = "example-hub",
ResourceGroupName = example.Name,
Location = example.Location,
VirtualWanId = exampleVirtualWan.Id,
AddressPrefix = "10.0.1.0/24",
});
var exampleVpnGateway = new Azure.Network.VpnGateway("example", new()
{
Name = "example-vpng",
Location = example.Location,
ResourceGroupName = example.Name,
VirtualHubId = exampleVirtualHub.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.network.VirtualNetwork;
import com.pulumi.azure.network.VirtualNetworkArgs;
import com.pulumi.azure.network.VirtualWan;
import com.pulumi.azure.network.VirtualWanArgs;
import com.pulumi.azure.network.VirtualHub;
import com.pulumi.azure.network.VirtualHubArgs;
import com.pulumi.azure.network.VpnGateway;
import com.pulumi.azure.network.VpnGatewayArgs;
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) {
var example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.name("example-network")
.location(example.location())
.resourceGroupName(example.name())
.addressSpaces("10.0.0.0/16")
.build());
var exampleVirtualWan = new VirtualWan("exampleVirtualWan", VirtualWanArgs.builder()
.name("example-vwan")
.resourceGroupName(example.name())
.location(example.location())
.build());
var exampleVirtualHub = new VirtualHub("exampleVirtualHub", VirtualHubArgs.builder()
.name("example-hub")
.resourceGroupName(example.name())
.location(example.location())
.virtualWanId(exampleVirtualWan.id())
.addressPrefix("10.0.1.0/24")
.build());
var exampleVpnGateway = new VpnGateway("exampleVpnGateway", VpnGatewayArgs.builder()
.name("example-vpng")
.location(example.location())
.resourceGroupName(example.name())
.virtualHubId(exampleVirtualHub.id())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleVirtualNetwork:
type: azure:network:VirtualNetwork
name: example
properties:
name: example-network
location: ${example.location}
resourceGroupName: ${example.name}
addressSpaces:
- 10.0.0.0/16
exampleVirtualWan:
type: azure:network:VirtualWan
name: example
properties:
name: example-vwan
resourceGroupName: ${example.name}
location: ${example.location}
exampleVirtualHub:
type: azure:network:VirtualHub
name: example
properties:
name: example-hub
resourceGroupName: ${example.name}
location: ${example.location}
virtualWanId: ${exampleVirtualWan.id}
addressPrefix: 10.0.1.0/24
exampleVpnGateway:
type: azure:network:VpnGateway
name: example
properties:
name: example-vpng
location: ${example.location}
resourceGroupName: ${example.name}
virtualHubId: ${exampleVirtualHub.id}
Create VpnGateway Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VpnGateway(name: string, args: VpnGatewayArgs, opts?: CustomResourceOptions);
@overload
def VpnGateway(resource_name: str,
args: VpnGatewayArgs,
opts: Optional[ResourceOptions] = None)
@overload
def VpnGateway(resource_name: str,
opts: Optional[ResourceOptions] = None,
resource_group_name: Optional[str] = None,
virtual_hub_id: Optional[str] = None,
bgp_route_translation_for_nat_enabled: Optional[bool] = None,
bgp_settings: Optional[VpnGatewayBgpSettingsArgs] = None,
location: Optional[str] = None,
name: Optional[str] = None,
routing_preference: Optional[str] = None,
scale_unit: Optional[int] = None,
tags: Optional[Mapping[str, str]] = None)
func NewVpnGateway(ctx *Context, name string, args VpnGatewayArgs, opts ...ResourceOption) (*VpnGateway, error)
public VpnGateway(string name, VpnGatewayArgs args, CustomResourceOptions? opts = null)
public VpnGateway(String name, VpnGatewayArgs args)
public VpnGateway(String name, VpnGatewayArgs args, CustomResourceOptions options)
type: azure:network:VpnGateway
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args VpnGatewayArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args VpnGatewayArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args VpnGatewayArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VpnGatewayArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VpnGatewayArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var vpnGatewayResource = new Azure.Network.VpnGateway("vpnGatewayResource", new()
{
ResourceGroupName = "string",
VirtualHubId = "string",
BgpRouteTranslationForNatEnabled = false,
BgpSettings = new Azure.Network.Inputs.VpnGatewayBgpSettingsArgs
{
Asn = 0,
PeerWeight = 0,
BgpPeeringAddress = "string",
Instance0BgpPeeringAddress = new Azure.Network.Inputs.VpnGatewayBgpSettingsInstance0BgpPeeringAddressArgs
{
CustomIps = new[]
{
"string",
},
DefaultIps = new[]
{
"string",
},
IpConfigurationId = "string",
TunnelIps = new[]
{
"string",
},
},
Instance1BgpPeeringAddress = new Azure.Network.Inputs.VpnGatewayBgpSettingsInstance1BgpPeeringAddressArgs
{
CustomIps = new[]
{
"string",
},
DefaultIps = new[]
{
"string",
},
IpConfigurationId = "string",
TunnelIps = new[]
{
"string",
},
},
},
Location = "string",
Name = "string",
RoutingPreference = "string",
ScaleUnit = 0,
Tags =
{
{ "string", "string" },
},
});
example, err := network.NewVpnGateway(ctx, "vpnGatewayResource", &network.VpnGatewayArgs{
ResourceGroupName: pulumi.String("string"),
VirtualHubId: pulumi.String("string"),
BgpRouteTranslationForNatEnabled: pulumi.Bool(false),
BgpSettings: &network.VpnGatewayBgpSettingsArgs{
Asn: pulumi.Int(0),
PeerWeight: pulumi.Int(0),
BgpPeeringAddress: pulumi.String("string"),
Instance0BgpPeeringAddress: &network.VpnGatewayBgpSettingsInstance0BgpPeeringAddressArgs{
CustomIps: pulumi.StringArray{
pulumi.String("string"),
},
DefaultIps: pulumi.StringArray{
pulumi.String("string"),
},
IpConfigurationId: pulumi.String("string"),
TunnelIps: pulumi.StringArray{
pulumi.String("string"),
},
},
Instance1BgpPeeringAddress: &network.VpnGatewayBgpSettingsInstance1BgpPeeringAddressArgs{
CustomIps: pulumi.StringArray{
pulumi.String("string"),
},
DefaultIps: pulumi.StringArray{
pulumi.String("string"),
},
IpConfigurationId: pulumi.String("string"),
TunnelIps: pulumi.StringArray{
pulumi.String("string"),
},
},
},
Location: pulumi.String("string"),
Name: pulumi.String("string"),
RoutingPreference: pulumi.String("string"),
ScaleUnit: pulumi.Int(0),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var vpnGatewayResource = new VpnGateway("vpnGatewayResource", VpnGatewayArgs.builder()
.resourceGroupName("string")
.virtualHubId("string")
.bgpRouteTranslationForNatEnabled(false)
.bgpSettings(VpnGatewayBgpSettingsArgs.builder()
.asn(0)
.peerWeight(0)
.bgpPeeringAddress("string")
.instance0BgpPeeringAddress(VpnGatewayBgpSettingsInstance0BgpPeeringAddressArgs.builder()
.customIps("string")
.defaultIps("string")
.ipConfigurationId("string")
.tunnelIps("string")
.build())
.instance1BgpPeeringAddress(VpnGatewayBgpSettingsInstance1BgpPeeringAddressArgs.builder()
.customIps("string")
.defaultIps("string")
.ipConfigurationId("string")
.tunnelIps("string")
.build())
.build())
.location("string")
.name("string")
.routingPreference("string")
.scaleUnit(0)
.tags(Map.of("string", "string"))
.build());
vpn_gateway_resource = azure.network.VpnGateway("vpnGatewayResource",
resource_group_name="string",
virtual_hub_id="string",
bgp_route_translation_for_nat_enabled=False,
bgp_settings={
"asn": 0,
"peer_weight": 0,
"bgp_peering_address": "string",
"instance0_bgp_peering_address": {
"custom_ips": ["string"],
"default_ips": ["string"],
"ip_configuration_id": "string",
"tunnel_ips": ["string"],
},
"instance1_bgp_peering_address": {
"custom_ips": ["string"],
"default_ips": ["string"],
"ip_configuration_id": "string",
"tunnel_ips": ["string"],
},
},
location="string",
name="string",
routing_preference="string",
scale_unit=0,
tags={
"string": "string",
})
const vpnGatewayResource = new azure.network.VpnGateway("vpnGatewayResource", {
resourceGroupName: "string",
virtualHubId: "string",
bgpRouteTranslationForNatEnabled: false,
bgpSettings: {
asn: 0,
peerWeight: 0,
bgpPeeringAddress: "string",
instance0BgpPeeringAddress: {
customIps: ["string"],
defaultIps: ["string"],
ipConfigurationId: "string",
tunnelIps: ["string"],
},
instance1BgpPeeringAddress: {
customIps: ["string"],
defaultIps: ["string"],
ipConfigurationId: "string",
tunnelIps: ["string"],
},
},
location: "string",
name: "string",
routingPreference: "string",
scaleUnit: 0,
tags: {
string: "string",
},
});
type: azure:network:VpnGateway
properties:
bgpRouteTranslationForNatEnabled: false
bgpSettings:
asn: 0
bgpPeeringAddress: string
instance0BgpPeeringAddress:
customIps:
- string
defaultIps:
- string
ipConfigurationId: string
tunnelIps:
- string
instance1BgpPeeringAddress:
customIps:
- string
defaultIps:
- string
ipConfigurationId: string
tunnelIps:
- string
peerWeight: 0
location: string
name: string
resourceGroupName: string
routingPreference: string
scaleUnit: 0
tags:
string: string
virtualHubId: string
VpnGateway Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The VpnGateway resource accepts the following input properties:
- Resource
Group stringName - The Name of the Resource Group in which this VPN Gateway should be created. Changing this forces a new resource to be created.
- Virtual
Hub stringId - The ID of the Virtual Hub within which this VPN Gateway should be created. Changing this forces a new resource to be created.
- Bgp
Route boolTranslation For Nat Enabled - Is BGP route translation for NAT on this VPN Gateway enabled? Defaults to
false
. - Bgp
Settings VpnGateway Bgp Settings - A
bgp_settings
block as defined below. - Location string
- The Azure location where this VPN Gateway should be created. Changing this forces a new resource to be created.
- Name string
- The Name which should be used for this VPN Gateway. Changing this forces a new resource to be created.
- Routing
Preference string - Azure routing preference lets you to choose how your traffic routes between Azure and the internet. You can choose to route traffic either via the Microsoft network (default value,
Microsoft Network
), or via the ISP network (public internet, set toInternet
). More context of the configuration can be found in the Microsoft Docs to create a VPN Gateway. Defaults toMicrosoft Network
. Changing this forces a new resource to be created. - Scale
Unit int - The Scale Unit for this VPN Gateway. Defaults to
1
. - Dictionary<string, string>
- A mapping of tags to assign to the VPN Gateway.
- Resource
Group stringName - The Name of the Resource Group in which this VPN Gateway should be created. Changing this forces a new resource to be created.
- Virtual
Hub stringId - The ID of the Virtual Hub within which this VPN Gateway should be created. Changing this forces a new resource to be created.
- Bgp
Route boolTranslation For Nat Enabled - Is BGP route translation for NAT on this VPN Gateway enabled? Defaults to
false
. - Bgp
Settings VpnGateway Bgp Settings Args - A
bgp_settings
block as defined below. - Location string
- The Azure location where this VPN Gateway should be created. Changing this forces a new resource to be created.
- Name string
- The Name which should be used for this VPN Gateway. Changing this forces a new resource to be created.
- Routing
Preference string - Azure routing preference lets you to choose how your traffic routes between Azure and the internet. You can choose to route traffic either via the Microsoft network (default value,
Microsoft Network
), or via the ISP network (public internet, set toInternet
). More context of the configuration can be found in the Microsoft Docs to create a VPN Gateway. Defaults toMicrosoft Network
. Changing this forces a new resource to be created. - Scale
Unit int - The Scale Unit for this VPN Gateway. Defaults to
1
. - map[string]string
- A mapping of tags to assign to the VPN Gateway.
- resource
Group StringName - The Name of the Resource Group in which this VPN Gateway should be created. Changing this forces a new resource to be created.
- virtual
Hub StringId - The ID of the Virtual Hub within which this VPN Gateway should be created. Changing this forces a new resource to be created.
- bgp
Route BooleanTranslation For Nat Enabled - Is BGP route translation for NAT on this VPN Gateway enabled? Defaults to
false
. - bgp
Settings VpnGateway Bgp Settings - A
bgp_settings
block as defined below. - location String
- The Azure location where this VPN Gateway should be created. Changing this forces a new resource to be created.
- name String
- The Name which should be used for this VPN Gateway. Changing this forces a new resource to be created.
- routing
Preference String - Azure routing preference lets you to choose how your traffic routes between Azure and the internet. You can choose to route traffic either via the Microsoft network (default value,
Microsoft Network
), or via the ISP network (public internet, set toInternet
). More context of the configuration can be found in the Microsoft Docs to create a VPN Gateway. Defaults toMicrosoft Network
. Changing this forces a new resource to be created. - scale
Unit Integer - The Scale Unit for this VPN Gateway. Defaults to
1
. - Map<String,String>
- A mapping of tags to assign to the VPN Gateway.
- resource
Group stringName - The Name of the Resource Group in which this VPN Gateway should be created. Changing this forces a new resource to be created.
- virtual
Hub stringId - The ID of the Virtual Hub within which this VPN Gateway should be created. Changing this forces a new resource to be created.
- bgp
Route booleanTranslation For Nat Enabled - Is BGP route translation for NAT on this VPN Gateway enabled? Defaults to
false
. - bgp
Settings VpnGateway Bgp Settings - A
bgp_settings
block as defined below. - location string
- The Azure location where this VPN Gateway should be created. Changing this forces a new resource to be created.
- name string
- The Name which should be used for this VPN Gateway. Changing this forces a new resource to be created.
- routing
Preference string - Azure routing preference lets you to choose how your traffic routes between Azure and the internet. You can choose to route traffic either via the Microsoft network (default value,
Microsoft Network
), or via the ISP network (public internet, set toInternet
). More context of the configuration can be found in the Microsoft Docs to create a VPN Gateway. Defaults toMicrosoft Network
. Changing this forces a new resource to be created. - scale
Unit number - The Scale Unit for this VPN Gateway. Defaults to
1
. - {[key: string]: string}
- A mapping of tags to assign to the VPN Gateway.
- resource_
group_ strname - The Name of the Resource Group in which this VPN Gateway should be created. Changing this forces a new resource to be created.
- virtual_
hub_ strid - The ID of the Virtual Hub within which this VPN Gateway should be created. Changing this forces a new resource to be created.
- bgp_
route_ booltranslation_ for_ nat_ enabled - Is BGP route translation for NAT on this VPN Gateway enabled? Defaults to
false
. - bgp_
settings VpnGateway Bgp Settings Args - A
bgp_settings
block as defined below. - location str
- The Azure location where this VPN Gateway should be created. Changing this forces a new resource to be created.
- name str
- The Name which should be used for this VPN Gateway. Changing this forces a new resource to be created.
- routing_
preference str - Azure routing preference lets you to choose how your traffic routes between Azure and the internet. You can choose to route traffic either via the Microsoft network (default value,
Microsoft Network
), or via the ISP network (public internet, set toInternet
). More context of the configuration can be found in the Microsoft Docs to create a VPN Gateway. Defaults toMicrosoft Network
. Changing this forces a new resource to be created. - scale_
unit int - The Scale Unit for this VPN Gateway. Defaults to
1
. - Mapping[str, str]
- A mapping of tags to assign to the VPN Gateway.
- resource
Group StringName - The Name of the Resource Group in which this VPN Gateway should be created. Changing this forces a new resource to be created.
- virtual
Hub StringId - The ID of the Virtual Hub within which this VPN Gateway should be created. Changing this forces a new resource to be created.
- bgp
Route BooleanTranslation For Nat Enabled - Is BGP route translation for NAT on this VPN Gateway enabled? Defaults to
false
. - bgp
Settings Property Map - A
bgp_settings
block as defined below. - location String
- The Azure location where this VPN Gateway should be created. Changing this forces a new resource to be created.
- name String
- The Name which should be used for this VPN Gateway. Changing this forces a new resource to be created.
- routing
Preference String - Azure routing preference lets you to choose how your traffic routes between Azure and the internet. You can choose to route traffic either via the Microsoft network (default value,
Microsoft Network
), or via the ISP network (public internet, set toInternet
). More context of the configuration can be found in the Microsoft Docs to create a VPN Gateway. Defaults toMicrosoft Network
. Changing this forces a new resource to be created. - scale
Unit Number - The Scale Unit for this VPN Gateway. Defaults to
1
. - Map<String>
- A mapping of tags to assign to the VPN Gateway.
Outputs
All input properties are implicitly available as output properties. Additionally, the VpnGateway resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing VpnGateway Resource
Get an existing VpnGateway resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: VpnGatewayState, opts?: CustomResourceOptions): VpnGateway
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bgp_route_translation_for_nat_enabled: Optional[bool] = None,
bgp_settings: Optional[VpnGatewayBgpSettingsArgs] = None,
location: Optional[str] = None,
name: Optional[str] = None,
resource_group_name: Optional[str] = None,
routing_preference: Optional[str] = None,
scale_unit: Optional[int] = None,
tags: Optional[Mapping[str, str]] = None,
virtual_hub_id: Optional[str] = None) -> VpnGateway
func GetVpnGateway(ctx *Context, name string, id IDInput, state *VpnGatewayState, opts ...ResourceOption) (*VpnGateway, error)
public static VpnGateway Get(string name, Input<string> id, VpnGatewayState? state, CustomResourceOptions? opts = null)
public static VpnGateway get(String name, Output<String> id, VpnGatewayState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Bgp
Route boolTranslation For Nat Enabled - Is BGP route translation for NAT on this VPN Gateway enabled? Defaults to
false
. - Bgp
Settings VpnGateway Bgp Settings - A
bgp_settings
block as defined below. - Location string
- The Azure location where this VPN Gateway should be created. Changing this forces a new resource to be created.
- Name string
- The Name which should be used for this VPN Gateway. Changing this forces a new resource to be created.
- Resource
Group stringName - The Name of the Resource Group in which this VPN Gateway should be created. Changing this forces a new resource to be created.
- Routing
Preference string - Azure routing preference lets you to choose how your traffic routes between Azure and the internet. You can choose to route traffic either via the Microsoft network (default value,
Microsoft Network
), or via the ISP network (public internet, set toInternet
). More context of the configuration can be found in the Microsoft Docs to create a VPN Gateway. Defaults toMicrosoft Network
. Changing this forces a new resource to be created. - Scale
Unit int - The Scale Unit for this VPN Gateway. Defaults to
1
. - Dictionary<string, string>
- A mapping of tags to assign to the VPN Gateway.
- Virtual
Hub stringId - The ID of the Virtual Hub within which this VPN Gateway should be created. Changing this forces a new resource to be created.
- Bgp
Route boolTranslation For Nat Enabled - Is BGP route translation for NAT on this VPN Gateway enabled? Defaults to
false
. - Bgp
Settings VpnGateway Bgp Settings Args - A
bgp_settings
block as defined below. - Location string
- The Azure location where this VPN Gateway should be created. Changing this forces a new resource to be created.
- Name string
- The Name which should be used for this VPN Gateway. Changing this forces a new resource to be created.
- Resource
Group stringName - The Name of the Resource Group in which this VPN Gateway should be created. Changing this forces a new resource to be created.
- Routing
Preference string - Azure routing preference lets you to choose how your traffic routes between Azure and the internet. You can choose to route traffic either via the Microsoft network (default value,
Microsoft Network
), or via the ISP network (public internet, set toInternet
). More context of the configuration can be found in the Microsoft Docs to create a VPN Gateway. Defaults toMicrosoft Network
. Changing this forces a new resource to be created. - Scale
Unit int - The Scale Unit for this VPN Gateway. Defaults to
1
. - map[string]string
- A mapping of tags to assign to the VPN Gateway.
- Virtual
Hub stringId - The ID of the Virtual Hub within which this VPN Gateway should be created. Changing this forces a new resource to be created.
- bgp
Route BooleanTranslation For Nat Enabled - Is BGP route translation for NAT on this VPN Gateway enabled? Defaults to
false
. - bgp
Settings VpnGateway Bgp Settings - A
bgp_settings
block as defined below. - location String
- The Azure location where this VPN Gateway should be created. Changing this forces a new resource to be created.
- name String
- The Name which should be used for this VPN Gateway. Changing this forces a new resource to be created.
- resource
Group StringName - The Name of the Resource Group in which this VPN Gateway should be created. Changing this forces a new resource to be created.
- routing
Preference String - Azure routing preference lets you to choose how your traffic routes between Azure and the internet. You can choose to route traffic either via the Microsoft network (default value,
Microsoft Network
), or via the ISP network (public internet, set toInternet
). More context of the configuration can be found in the Microsoft Docs to create a VPN Gateway. Defaults toMicrosoft Network
. Changing this forces a new resource to be created. - scale
Unit Integer - The Scale Unit for this VPN Gateway. Defaults to
1
. - Map<String,String>
- A mapping of tags to assign to the VPN Gateway.
- virtual
Hub StringId - The ID of the Virtual Hub within which this VPN Gateway should be created. Changing this forces a new resource to be created.
- bgp
Route booleanTranslation For Nat Enabled - Is BGP route translation for NAT on this VPN Gateway enabled? Defaults to
false
. - bgp
Settings VpnGateway Bgp Settings - A
bgp_settings
block as defined below. - location string
- The Azure location where this VPN Gateway should be created. Changing this forces a new resource to be created.
- name string
- The Name which should be used for this VPN Gateway. Changing this forces a new resource to be created.
- resource
Group stringName - The Name of the Resource Group in which this VPN Gateway should be created. Changing this forces a new resource to be created.
- routing
Preference string - Azure routing preference lets you to choose how your traffic routes between Azure and the internet. You can choose to route traffic either via the Microsoft network (default value,
Microsoft Network
), or via the ISP network (public internet, set toInternet
). More context of the configuration can be found in the Microsoft Docs to create a VPN Gateway. Defaults toMicrosoft Network
. Changing this forces a new resource to be created. - scale
Unit number - The Scale Unit for this VPN Gateway. Defaults to
1
. - {[key: string]: string}
- A mapping of tags to assign to the VPN Gateway.
- virtual
Hub stringId - The ID of the Virtual Hub within which this VPN Gateway should be created. Changing this forces a new resource to be created.
- bgp_
route_ booltranslation_ for_ nat_ enabled - Is BGP route translation for NAT on this VPN Gateway enabled? Defaults to
false
. - bgp_
settings VpnGateway Bgp Settings Args - A
bgp_settings
block as defined below. - location str
- The Azure location where this VPN Gateway should be created. Changing this forces a new resource to be created.
- name str
- The Name which should be used for this VPN Gateway. Changing this forces a new resource to be created.
- resource_
group_ strname - The Name of the Resource Group in which this VPN Gateway should be created. Changing this forces a new resource to be created.
- routing_
preference str - Azure routing preference lets you to choose how your traffic routes between Azure and the internet. You can choose to route traffic either via the Microsoft network (default value,
Microsoft Network
), or via the ISP network (public internet, set toInternet
). More context of the configuration can be found in the Microsoft Docs to create a VPN Gateway. Defaults toMicrosoft Network
. Changing this forces a new resource to be created. - scale_
unit int - The Scale Unit for this VPN Gateway. Defaults to
1
. - Mapping[str, str]
- A mapping of tags to assign to the VPN Gateway.
- virtual_
hub_ strid - The ID of the Virtual Hub within which this VPN Gateway should be created. Changing this forces a new resource to be created.
- bgp
Route BooleanTranslation For Nat Enabled - Is BGP route translation for NAT on this VPN Gateway enabled? Defaults to
false
. - bgp
Settings Property Map - A
bgp_settings
block as defined below. - location String
- The Azure location where this VPN Gateway should be created. Changing this forces a new resource to be created.
- name String
- The Name which should be used for this VPN Gateway. Changing this forces a new resource to be created.
- resource
Group StringName - The Name of the Resource Group in which this VPN Gateway should be created. Changing this forces a new resource to be created.
- routing
Preference String - Azure routing preference lets you to choose how your traffic routes between Azure and the internet. You can choose to route traffic either via the Microsoft network (default value,
Microsoft Network
), or via the ISP network (public internet, set toInternet
). More context of the configuration can be found in the Microsoft Docs to create a VPN Gateway. Defaults toMicrosoft Network
. Changing this forces a new resource to be created. - scale
Unit Number - The Scale Unit for this VPN Gateway. Defaults to
1
. - Map<String>
- A mapping of tags to assign to the VPN Gateway.
- virtual
Hub StringId - The ID of the Virtual Hub within which this VPN Gateway should be created. Changing this forces a new resource to be created.
Supporting Types
VpnGatewayBgpSettings, VpnGatewayBgpSettingsArgs
- Asn int
- The ASN of the BGP Speaker. Changing this forces a new resource to be created.
- Peer
Weight int - The weight added to Routes learned from this BGP Speaker. Changing this forces a new resource to be created.
- Bgp
Peering stringAddress - The Address which should be used for the BGP Peering.
- Instance0Bgp
Peering VpnAddress Gateway Bgp Settings Instance0Bgp Peering Address - An
instance_bgp_peering_address
block as defined below. - Instance1Bgp
Peering VpnAddress Gateway Bgp Settings Instance1Bgp Peering Address - An
instance_bgp_peering_address
block as defined below.
- Asn int
- The ASN of the BGP Speaker. Changing this forces a new resource to be created.
- Peer
Weight int - The weight added to Routes learned from this BGP Speaker. Changing this forces a new resource to be created.
- Bgp
Peering stringAddress - The Address which should be used for the BGP Peering.
- Instance0Bgp
Peering VpnAddress Gateway Bgp Settings Instance0Bgp Peering Address - An
instance_bgp_peering_address
block as defined below. - Instance1Bgp
Peering VpnAddress Gateway Bgp Settings Instance1Bgp Peering Address - An
instance_bgp_peering_address
block as defined below.
- asn Integer
- The ASN of the BGP Speaker. Changing this forces a new resource to be created.
- peer
Weight Integer - The weight added to Routes learned from this BGP Speaker. Changing this forces a new resource to be created.
- bgp
Peering StringAddress - The Address which should be used for the BGP Peering.
- instance0Bgp
Peering VpnAddress Gateway Bgp Settings Instance0Bgp Peering Address - An
instance_bgp_peering_address
block as defined below. - instance1Bgp
Peering VpnAddress Gateway Bgp Settings Instance1Bgp Peering Address - An
instance_bgp_peering_address
block as defined below.
- asn number
- The ASN of the BGP Speaker. Changing this forces a new resource to be created.
- peer
Weight number - The weight added to Routes learned from this BGP Speaker. Changing this forces a new resource to be created.
- bgp
Peering stringAddress - The Address which should be used for the BGP Peering.
- instance0Bgp
Peering VpnAddress Gateway Bgp Settings Instance0Bgp Peering Address - An
instance_bgp_peering_address
block as defined below. - instance1Bgp
Peering VpnAddress Gateway Bgp Settings Instance1Bgp Peering Address - An
instance_bgp_peering_address
block as defined below.
- asn int
- The ASN of the BGP Speaker. Changing this forces a new resource to be created.
- peer_
weight int - The weight added to Routes learned from this BGP Speaker. Changing this forces a new resource to be created.
- bgp_
peering_ straddress - The Address which should be used for the BGP Peering.
- instance0_
bgp_ Vpnpeering_ address Gateway Bgp Settings Instance0Bgp Peering Address - An
instance_bgp_peering_address
block as defined below. - instance1_
bgp_ Vpnpeering_ address Gateway Bgp Settings Instance1Bgp Peering Address - An
instance_bgp_peering_address
block as defined below.
- asn Number
- The ASN of the BGP Speaker. Changing this forces a new resource to be created.
- peer
Weight Number - The weight added to Routes learned from this BGP Speaker. Changing this forces a new resource to be created.
- bgp
Peering StringAddress - The Address which should be used for the BGP Peering.
- instance0Bgp
Peering Property MapAddress - An
instance_bgp_peering_address
block as defined below. - instance1Bgp
Peering Property MapAddress - An
instance_bgp_peering_address
block as defined below.
VpnGatewayBgpSettingsInstance0BgpPeeringAddress, VpnGatewayBgpSettingsInstance0BgpPeeringAddressArgs
- Custom
Ips List<string> - A list of custom BGP peering addresses to assign 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 assign 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 assign 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 assign 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 assign 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 assign 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.
VpnGatewayBgpSettingsInstance1BgpPeeringAddress, VpnGatewayBgpSettingsInstance1BgpPeeringAddressArgs
- Custom
Ips List<string> - A list of custom BGP peering addresses to assign 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 assign 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 assign 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 assign 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 assign 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 assign 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.
Import
VPN Gateways can be imported using the resource id
, e.g.
$ pulumi import azure:network/vpnGateway:VpnGateway gateway1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/vpnGateways/gateway1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.