import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a Virtual Network Gateway Nat Rule. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const exampleResourceGroup = new azure.core.ResourceGroup("example", { * name: "example-resources", * location: "West Europe", * }); * const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", { * name: "example-vnet", * location: exampleResourceGroup.location, * resourceGroupName: exampleResourceGroup.name, * addressSpaces: ["10.0.0.0/16"], * }); * const exampleSubnet = new azure.network.Subnet("example", { * name: "GatewaySubnet", * resourceGroupName: exampleResourceGroup.name, * virtualNetworkName: exampleVirtualNetwork.name, * addressPrefixes: ["10.0.1.0/24"], * }); * const examplePublicIp = new azure.network.PublicIp("example", { * name: "example-pip", * location: exampleResourceGroup.location, * resourceGroupName: exampleResourceGroup.name, * allocationMethod: "Dynamic", * }); * const exampleVirtualNetworkGateway = new azure.network.VirtualNetworkGateway("example", { * name: "example-vnetgw", * location: exampleResourceGroup.location, * resourceGroupName: exampleResourceGroup.name, * type: "Vpn", * vpnType: "RouteBased", * sku: "Basic", * ipConfigurations: [{ * publicIpAddressId: examplePublicIp.id, * privateIpAddressAllocation: "Dynamic", * subnetId: exampleSubnet.id, * }], * }); * const example = azure.network.getVirtualNetworkGatewayOutput({ * name: exampleVirtualNetworkGateway.name, * resourceGroupName: exampleVirtualNetworkGateway.resourceGroupName, * }); * const exampleVirtualNetworkGatewayNatRule = new azure.network.VirtualNetworkGatewayNatRule("example", { * name: "example-vnetgwnatrule", * resourceGroupName: exampleResourceGroup.name, * virtualNetworkGatewayId: example.apply(example => example.id), * mode: "EgressSnat", * type: "Dynamic", * ipConfigurationId: example.apply(example => example.ipConfigurations?.[0]?.id), * externalMappings: [{ * addressSpace: "10.2.0.0/26", * portRange: "200", * }], * internalMappings: [{ * addressSpace: "10.4.0.0/26", * portRange: "400", * }], * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Network` - 2025-01-01 * * ## Import * * Virtual Network Gateway Nat Rules can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:network/virtualNetworkGatewayNatRule:VirtualNetworkGatewayNatRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Network/virtualNetworkGateways/gw1/natRules/rule1 * ``` */ export declare class VirtualNetworkGatewayNatRule extends pulumi.CustomResource { /** * Get an existing VirtualNetworkGatewayNatRule resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: VirtualNetworkGatewayNatRuleState, opts?: pulumi.CustomResourceOptions): VirtualNetworkGatewayNatRule; /** * Returns true if the given object is an instance of VirtualNetworkGatewayNatRule. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is VirtualNetworkGatewayNatRule; /** * One or more `externalMapping` blocks as documented below. */ readonly externalMappings: pulumi.Output; /** * One or more `internalMapping` blocks as documented below. */ readonly internalMappings: pulumi.Output; /** * The ID of the IP Configuration this Virtual Network Gateway Nat Rule applies to. */ readonly ipConfigurationId: pulumi.Output; /** * The source Nat direction of the Virtual Network Gateway Nat. Possible values are `EgressSnat` and `IngressSnat`. Defaults to `EgressSnat`. Changing this forces a new resource to be created. */ readonly mode: pulumi.Output; /** * The name which should be used for this Virtual Network Gateway Nat Rule. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * The Name of the Resource Group in which this Virtual Network Gateway Nat Rule should be created. Changing this forces a new resource to be created. */ readonly resourceGroupName: pulumi.Output; /** * The type of the Virtual Network Gateway Nat Rule. Possible values are `Dynamic` and `Static`. Defaults to `Static`. Changing this forces a new resource to be created. */ readonly type: pulumi.Output; /** * The ID of the Virtual Network Gateway that this Virtual Network Gateway Nat Rule belongs to. Changing this forces a new resource to be created. */ readonly virtualNetworkGatewayId: pulumi.Output; /** * Create a VirtualNetworkGatewayNatRule resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: VirtualNetworkGatewayNatRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering VirtualNetworkGatewayNatRule resources. */ export interface VirtualNetworkGatewayNatRuleState { /** * One or more `externalMapping` blocks as documented below. */ externalMappings?: pulumi.Input[]>; /** * One or more `internalMapping` blocks as documented below. */ internalMappings?: pulumi.Input[]>; /** * The ID of the IP Configuration this Virtual Network Gateway Nat Rule applies to. */ ipConfigurationId?: pulumi.Input; /** * The source Nat direction of the Virtual Network Gateway Nat. Possible values are `EgressSnat` and `IngressSnat`. Defaults to `EgressSnat`. Changing this forces a new resource to be created. */ mode?: pulumi.Input; /** * The name which should be used for this Virtual Network Gateway Nat Rule. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * The Name of the Resource Group in which this Virtual Network Gateway Nat Rule should be created. Changing this forces a new resource to be created. */ resourceGroupName?: pulumi.Input; /** * The type of the Virtual Network Gateway Nat Rule. Possible values are `Dynamic` and `Static`. Defaults to `Static`. Changing this forces a new resource to be created. */ type?: pulumi.Input; /** * The ID of the Virtual Network Gateway that this Virtual Network Gateway Nat Rule belongs to. Changing this forces a new resource to be created. */ virtualNetworkGatewayId?: pulumi.Input; } /** * The set of arguments for constructing a VirtualNetworkGatewayNatRule resource. */ export interface VirtualNetworkGatewayNatRuleArgs { /** * One or more `externalMapping` blocks as documented below. */ externalMappings: pulumi.Input[]>; /** * One or more `internalMapping` blocks as documented below. */ internalMappings: pulumi.Input[]>; /** * The ID of the IP Configuration this Virtual Network Gateway Nat Rule applies to. */ ipConfigurationId?: pulumi.Input; /** * The source Nat direction of the Virtual Network Gateway Nat. Possible values are `EgressSnat` and `IngressSnat`. Defaults to `EgressSnat`. Changing this forces a new resource to be created. */ mode?: pulumi.Input; /** * The name which should be used for this Virtual Network Gateway Nat Rule. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * The Name of the Resource Group in which this Virtual Network Gateway Nat Rule should be created. Changing this forces a new resource to be created. */ resourceGroupName: pulumi.Input; /** * The type of the Virtual Network Gateway Nat Rule. Possible values are `Dynamic` and `Static`. Defaults to `Static`. Changing this forces a new resource to be created. */ type?: pulumi.Input; /** * The ID of the Virtual Network Gateway that this Virtual Network Gateway Nat Rule belongs to. Changing this forces a new resource to be created. */ virtualNetworkGatewayId: pulumi.Input; }