VpnGatewayArgs

data class VpnGatewayArgs(val bgpRouteTranslationForNatEnabled: Output<Boolean>? = null, val bgpSettings: Output<VpnGatewayBgpSettingsArgs>? = null, val location: Output<String>? = null, val name: Output<String>? = null, val resourceGroupName: Output<String>? = null, val routingPreference: Output<String>? = null, val scaleUnit: Output<Int>? = null, val tags: Output<Map<String, String>>? = null, val virtualHubId: Output<String>? = null) : ConvertibleToJava<VpnGatewayArgs>

Manages a VPN Gateway within a Virtual Hub, which enables Site-to-Site communication.

Example Usage

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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.addressSpaces("10.0.0.0/16")
.build());
var exampleVirtualWan = new VirtualWan("exampleVirtualWan", VirtualWanArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.build());
var exampleVirtualHub = new VirtualHub("exampleVirtualHub", VirtualHubArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.virtualWanId(exampleVirtualWan.id())
.addressPrefix("10.0.1.0/24")
.build());
var exampleVpnGateway = new VpnGateway("exampleVpnGateway", VpnGatewayArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.virtualHubId(exampleVirtualHub.id())
.build());
}
}

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

Constructors

Link copied to clipboard
fun VpnGatewayArgs(bgpRouteTranslationForNatEnabled: Output<Boolean>? = null, bgpSettings: Output<VpnGatewayBgpSettingsArgs>? = null, location: Output<String>? = null, name: Output<String>? = null, resourceGroupName: Output<String>? = null, routingPreference: Output<String>? = null, scaleUnit: Output<Int>? = null, tags: Output<Map<String, String>>? = null, virtualHubId: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): VpnGatewayArgs

Properties

Link copied to clipboard

Is BGP route translation for NAT on this VPN Gateway enabled? Defaults to false.

Link copied to clipboard

A bgp_settings block as defined below.

Link copied to clipboard
val location: Output<String>? = null

The Azure location where this VPN Gateway should be created. Changing this forces a new resource to be created.

Link copied to clipboard
val name: Output<String>? = null

The Name which should be used for this VPN Gateway. Changing this forces a new resource to be created.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The Name of the Resource Group in which this VPN Gateway should be created. Changing this forces a new resource to be created.

Link copied to clipboard
val routingPreference: Output<String>? = null

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 to Internet). More context of the configuration can be found in the Microsoft Docs to create a VPN Gateway. Changing this forces a new resource to be created.

Link copied to clipboard
val scaleUnit: Output<Int>? = null

The Scale Unit for this VPN Gateway. Defaults to 1.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A mapping of tags to assign to the VPN Gateway.

Link copied to clipboard
val virtualHubId: Output<String>? = null

The ID of the Virtual Hub within which this VPN Gateway should be created. Changing this forces a new resource to be created.