VnpGatewayNatRule

class VnpGatewayNatRule : KotlinCustomResource

Manages a VPN Gateway NAT Rule.

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.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 com.pulumi.azure.network.VnpGatewayNatRule;
import com.pulumi.azure.network.VnpGatewayNatRuleArgs;
import com.pulumi.azure.network.inputs.VnpGatewayNatRuleExternalMappingArgs;
import com.pulumi.azure.network.inputs.VnpGatewayNatRuleInternalMappingArgs;
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 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())
.addressPrefix("10.0.1.0/24")
.virtualWanId(exampleVirtualWan.id())
.build());
var exampleVpnGateway = new VpnGateway("exampleVpnGateway", VpnGatewayArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.virtualHubId(exampleVirtualHub.id())
.build());
var exampleVnpGatewayNatRule = new VnpGatewayNatRule("exampleVnpGatewayNatRule", VnpGatewayNatRuleArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.vpnGatewayId(exampleVpnGateway.id())
.externalMappings(VnpGatewayNatRuleExternalMappingArgs.builder()
.addressSpace("192.168.21.0/26")
.build())
.internalMappings(VnpGatewayNatRuleInternalMappingArgs.builder()
.addressSpace("10.4.0.0/26")
.build())
.build());
}
}

Import

VPN Gateway NAT Rules can be imported using the resource id, e.g.

$ pulumi import azure:network/vnpGatewayNatRule:VnpGatewayNatRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Network/vpnGateways/vpnGateway1/natRules/natRule1

Properties

Link copied to clipboard

(Deprecated) A list of CIDR Ranges which are used for external mapping of the VPN Gateway NAT Rule.

Link copied to clipboard

One or more external_mapping blocks as documented below.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

(Deprecated) A list of CIDR Ranges which are used for internal mapping of the VPN Gateway NAT Rule.

Link copied to clipboard

One or more internal_mapping blocks as documented below.

Link copied to clipboard

The ID of the IP Configuration this VPN Gateway NAT Rule applies to. Possible values are Instance0 and Instance1.

Link copied to clipboard
val mode: Output<String>?

The source NAT direction of the VPN NAT. Possible values are EgressSnat and IngressSnat. Defaults to EgressSnat. 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 NAT Rule. 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 NAT Rule should be created. Changing this forces a new resource to be created.

Link copied to clipboard
val type: Output<String>?

The type of the VPN Gateway NAT Rule. Possible values are Dynamic and Static. Defaults to Static. Changing this forces a new resource to be created.

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

The ID of the VPN Gateway that this VPN Gateway NAT Rule belongs to. Changing this forces a new resource to be created.