VpnGateway

class VpnGateway : KotlinCustomResource

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

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 id: Output<String>
Link copied to clipboard
val location: Output<String>

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>

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

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

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

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>?

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

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

A mapping of tags to assign to the VPN Gateway.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val virtualHubId: Output<String>

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