1. Packages
  2. Azure Classic
  3. API Docs
  4. lb
  5. NatRule

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Manages a Load Balancer NAT Rule.

    NOTE: This resource cannot be used with with virtual machine scale sets, instead use the azure.lb.NatPool resource.

    NOTE When using this resource, the Load Balancer needs to have a FrontEnd IP Configuration Attached

    Example Usage

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
            {
                Location = "West Europe",
            });
            var examplePublicIp = new Azure.Network.PublicIp("examplePublicIp", new Azure.Network.PublicIpArgs
            {
                Location = "West US",
                ResourceGroupName = exampleResourceGroup.Name,
                AllocationMethod = "Static",
            });
            var exampleLoadBalancer = new Azure.Lb.LoadBalancer("exampleLoadBalancer", new Azure.Lb.LoadBalancerArgs
            {
                Location = "West US",
                ResourceGroupName = exampleResourceGroup.Name,
                FrontendIpConfigurations = 
                {
                    new Azure.Lb.Inputs.LoadBalancerFrontendIpConfigurationArgs
                    {
                        Name = "PublicIPAddress",
                        PublicIpAddressId = examplePublicIp.Id,
                    },
                },
            });
            var exampleNatRule = new Azure.Lb.NatRule("exampleNatRule", new Azure.Lb.NatRuleArgs
            {
                ResourceGroupName = exampleResourceGroup.Name,
                LoadbalancerId = exampleLoadBalancer.Id,
                Protocol = "Tcp",
                FrontendPort = 3389,
                BackendPort = 3389,
                FrontendIpConfigurationName = "PublicIPAddress",
            });
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/lb"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/network"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		examplePublicIp, err := network.NewPublicIp(ctx, "examplePublicIp", &network.PublicIpArgs{
    			Location:          pulumi.String("West US"),
    			ResourceGroupName: exampleResourceGroup.Name,
    			AllocationMethod:  pulumi.String("Static"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleLoadBalancer, err := lb.NewLoadBalancer(ctx, "exampleLoadBalancer", &lb.LoadBalancerArgs{
    			Location:          pulumi.String("West US"),
    			ResourceGroupName: exampleResourceGroup.Name,
    			FrontendIpConfigurations: lb.LoadBalancerFrontendIpConfigurationArray{
    				&lb.LoadBalancerFrontendIpConfigurationArgs{
    					Name:              pulumi.String("PublicIPAddress"),
    					PublicIpAddressId: examplePublicIp.ID(),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = lb.NewNatRule(ctx, "exampleNatRule", &lb.NatRuleArgs{
    			ResourceGroupName:           exampleResourceGroup.Name,
    			LoadbalancerId:              exampleLoadBalancer.ID(),
    			Protocol:                    pulumi.String("Tcp"),
    			FrontendPort:                pulumi.Int(3389),
    			BackendPort:                 pulumi.Int(3389),
    			FrontendIpConfigurationName: pulumi.String("PublicIPAddress"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
    const examplePublicIp = new azure.network.PublicIp("examplePublicIp", {
        location: "West US",
        resourceGroupName: exampleResourceGroup.name,
        allocationMethod: "Static",
    });
    const exampleLoadBalancer = new azure.lb.LoadBalancer("exampleLoadBalancer", {
        location: "West US",
        resourceGroupName: exampleResourceGroup.name,
        frontendIpConfigurations: [{
            name: "PublicIPAddress",
            publicIpAddressId: examplePublicIp.id,
        }],
    });
    const exampleNatRule = new azure.lb.NatRule("exampleNatRule", {
        resourceGroupName: exampleResourceGroup.name,
        loadbalancerId: exampleLoadBalancer.id,
        protocol: "Tcp",
        frontendPort: 3389,
        backendPort: 3389,
        frontendIpConfigurationName: "PublicIPAddress",
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    example_public_ip = azure.network.PublicIp("examplePublicIp",
        location="West US",
        resource_group_name=example_resource_group.name,
        allocation_method="Static")
    example_load_balancer = azure.lb.LoadBalancer("exampleLoadBalancer",
        location="West US",
        resource_group_name=example_resource_group.name,
        frontend_ip_configurations=[azure.lb.LoadBalancerFrontendIpConfigurationArgs(
            name="PublicIPAddress",
            public_ip_address_id=example_public_ip.id,
        )])
    example_nat_rule = azure.lb.NatRule("exampleNatRule",
        resource_group_name=example_resource_group.name,
        loadbalancer_id=example_load_balancer.id,
        protocol="Tcp",
        frontend_port=3389,
        backend_port=3389,
        frontend_ip_configuration_name="PublicIPAddress")
    

    Example coming soon!

    Create NatRule Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new NatRule(name: string, args: NatRuleArgs, opts?: CustomResourceOptions);
    @overload
    def NatRule(resource_name: str,
                args: NatRuleArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def NatRule(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                backend_port: Optional[int] = None,
                frontend_ip_configuration_name: Optional[str] = None,
                frontend_port: Optional[int] = None,
                loadbalancer_id: Optional[str] = None,
                protocol: Optional[str] = None,
                resource_group_name: Optional[str] = None,
                enable_floating_ip: Optional[bool] = None,
                enable_tcp_reset: Optional[bool] = None,
                idle_timeout_in_minutes: Optional[int] = None,
                name: Optional[str] = None)
    func NewNatRule(ctx *Context, name string, args NatRuleArgs, opts ...ResourceOption) (*NatRule, error)
    public NatRule(string name, NatRuleArgs args, CustomResourceOptions? opts = null)
    public NatRule(String name, NatRuleArgs args)
    public NatRule(String name, NatRuleArgs args, CustomResourceOptions options)
    
    type: azure:lb:NatRule
    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 NatRuleArgs
    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 NatRuleArgs
    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 NatRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NatRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NatRuleArgs
    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 natRuleResource = new Azure.Lb.NatRule("natRuleResource", new()
    {
        BackendPort = 0,
        FrontendIpConfigurationName = "string",
        FrontendPort = 0,
        LoadbalancerId = "string",
        Protocol = "string",
        ResourceGroupName = "string",
        EnableFloatingIp = false,
        EnableTcpReset = false,
        IdleTimeoutInMinutes = 0,
        Name = "string",
    });
    
    example, err := lb.NewNatRule(ctx, "natRuleResource", &lb.NatRuleArgs{
    	BackendPort:                 pulumi.Int(0),
    	FrontendIpConfigurationName: pulumi.String("string"),
    	FrontendPort:                pulumi.Int(0),
    	LoadbalancerId:              pulumi.String("string"),
    	Protocol:                    pulumi.String("string"),
    	ResourceGroupName:           pulumi.String("string"),
    	EnableFloatingIp:            pulumi.Bool(false),
    	EnableTcpReset:              pulumi.Bool(false),
    	IdleTimeoutInMinutes:        pulumi.Int(0),
    	Name:                        pulumi.String("string"),
    })
    
    var natRuleResource = new NatRule("natRuleResource", NatRuleArgs.builder()
        .backendPort(0)
        .frontendIpConfigurationName("string")
        .frontendPort(0)
        .loadbalancerId("string")
        .protocol("string")
        .resourceGroupName("string")
        .enableFloatingIp(false)
        .enableTcpReset(false)
        .idleTimeoutInMinutes(0)
        .name("string")
        .build());
    
    nat_rule_resource = azure.lb.NatRule("natRuleResource",
        backend_port=0,
        frontend_ip_configuration_name="string",
        frontend_port=0,
        loadbalancer_id="string",
        protocol="string",
        resource_group_name="string",
        enable_floating_ip=False,
        enable_tcp_reset=False,
        idle_timeout_in_minutes=0,
        name="string")
    
    const natRuleResource = new azure.lb.NatRule("natRuleResource", {
        backendPort: 0,
        frontendIpConfigurationName: "string",
        frontendPort: 0,
        loadbalancerId: "string",
        protocol: "string",
        resourceGroupName: "string",
        enableFloatingIp: false,
        enableTcpReset: false,
        idleTimeoutInMinutes: 0,
        name: "string",
    });
    
    type: azure:lb:NatRule
    properties:
        backendPort: 0
        enableFloatingIp: false
        enableTcpReset: false
        frontendIpConfigurationName: string
        frontendPort: 0
        idleTimeoutInMinutes: 0
        loadbalancerId: string
        name: string
        protocol: string
        resourceGroupName: string
    

    NatRule 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 NatRule resource accepts the following input properties:

    BackendPort int
    The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive.
    FrontendIpConfigurationName string
    The name of the frontend IP configuration exposing this rule.
    FrontendPort int
    The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 0 and 65534, inclusive.
    LoadbalancerId string
    The ID of the Load Balancer in which to create the NAT Rule.
    Protocol string
    The transport protocol for the external endpoint. Possible values are Udp, Tcp or All.
    ResourceGroupName string
    The name of the resource group in which to create the resource.
    EnableFloatingIp bool
    Are the Floating IPs enabled for this Load Balancer Rule? A "floating” IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to false.
    EnableTcpReset bool
    Is TCP Reset enabled for this Load Balancer Rule? Defaults to false.
    IdleTimeoutInMinutes int
    Specifies the idle timeout in minutes for TCP connections. Valid values are between 4 and 30 minutes. Defaults to 4 minutes.
    Name string
    Specifies the name of the NAT Rule.
    BackendPort int
    The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive.
    FrontendIpConfigurationName string
    The name of the frontend IP configuration exposing this rule.
    FrontendPort int
    The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 0 and 65534, inclusive.
    LoadbalancerId string
    The ID of the Load Balancer in which to create the NAT Rule.
    Protocol string
    The transport protocol for the external endpoint. Possible values are Udp, Tcp or All.
    ResourceGroupName string
    The name of the resource group in which to create the resource.
    EnableFloatingIp bool
    Are the Floating IPs enabled for this Load Balancer Rule? A "floating” IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to false.
    EnableTcpReset bool
    Is TCP Reset enabled for this Load Balancer Rule? Defaults to false.
    IdleTimeoutInMinutes int
    Specifies the idle timeout in minutes for TCP connections. Valid values are between 4 and 30 minutes. Defaults to 4 minutes.
    Name string
    Specifies the name of the NAT Rule.
    backendPort Integer
    The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive.
    frontendIpConfigurationName String
    The name of the frontend IP configuration exposing this rule.
    frontendPort Integer
    The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 0 and 65534, inclusive.
    loadbalancerId String
    The ID of the Load Balancer in which to create the NAT Rule.
    protocol String
    The transport protocol for the external endpoint. Possible values are Udp, Tcp or All.
    resourceGroupName String
    The name of the resource group in which to create the resource.
    enableFloatingIp Boolean
    Are the Floating IPs enabled for this Load Balancer Rule? A "floating” IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to false.
    enableTcpReset Boolean
    Is TCP Reset enabled for this Load Balancer Rule? Defaults to false.
    idleTimeoutInMinutes Integer
    Specifies the idle timeout in minutes for TCP connections. Valid values are between 4 and 30 minutes. Defaults to 4 minutes.
    name String
    Specifies the name of the NAT Rule.
    backendPort number
    The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive.
    frontendIpConfigurationName string
    The name of the frontend IP configuration exposing this rule.
    frontendPort number
    The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 0 and 65534, inclusive.
    loadbalancerId string
    The ID of the Load Balancer in which to create the NAT Rule.
    protocol string
    The transport protocol for the external endpoint. Possible values are Udp, Tcp or All.
    resourceGroupName string
    The name of the resource group in which to create the resource.
    enableFloatingIp boolean
    Are the Floating IPs enabled for this Load Balancer Rule? A "floating” IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to false.
    enableTcpReset boolean
    Is TCP Reset enabled for this Load Balancer Rule? Defaults to false.
    idleTimeoutInMinutes number
    Specifies the idle timeout in minutes for TCP connections. Valid values are between 4 and 30 minutes. Defaults to 4 minutes.
    name string
    Specifies the name of the NAT Rule.
    backend_port int
    The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive.
    frontend_ip_configuration_name str
    The name of the frontend IP configuration exposing this rule.
    frontend_port int
    The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 0 and 65534, inclusive.
    loadbalancer_id str
    The ID of the Load Balancer in which to create the NAT Rule.
    protocol str
    The transport protocol for the external endpoint. Possible values are Udp, Tcp or All.
    resource_group_name str
    The name of the resource group in which to create the resource.
    enable_floating_ip bool
    Are the Floating IPs enabled for this Load Balancer Rule? A "floating” IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to false.
    enable_tcp_reset bool
    Is TCP Reset enabled for this Load Balancer Rule? Defaults to false.
    idle_timeout_in_minutes int
    Specifies the idle timeout in minutes for TCP connections. Valid values are between 4 and 30 minutes. Defaults to 4 minutes.
    name str
    Specifies the name of the NAT Rule.
    backendPort Number
    The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive.
    frontendIpConfigurationName String
    The name of the frontend IP configuration exposing this rule.
    frontendPort Number
    The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 0 and 65534, inclusive.
    loadbalancerId String
    The ID of the Load Balancer in which to create the NAT Rule.
    protocol String
    The transport protocol for the external endpoint. Possible values are Udp, Tcp or All.
    resourceGroupName String
    The name of the resource group in which to create the resource.
    enableFloatingIp Boolean
    Are the Floating IPs enabled for this Load Balancer Rule? A "floating” IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to false.
    enableTcpReset Boolean
    Is TCP Reset enabled for this Load Balancer Rule? Defaults to false.
    idleTimeoutInMinutes Number
    Specifies the idle timeout in minutes for TCP connections. Valid values are between 4 and 30 minutes. Defaults to 4 minutes.
    name String
    Specifies the name of the NAT Rule.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NatRule resource produces the following output properties:

    BackendIpConfigurationId string
    FrontendIpConfigurationId string
    Id string
    The provider-assigned unique ID for this managed resource.
    BackendIpConfigurationId string
    FrontendIpConfigurationId string
    Id string
    The provider-assigned unique ID for this managed resource.
    backendIpConfigurationId String
    frontendIpConfigurationId String
    id String
    The provider-assigned unique ID for this managed resource.
    backendIpConfigurationId string
    frontendIpConfigurationId string
    id string
    The provider-assigned unique ID for this managed resource.
    backend_ip_configuration_id str
    frontend_ip_configuration_id str
    id str
    The provider-assigned unique ID for this managed resource.
    backendIpConfigurationId String
    frontendIpConfigurationId String
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing NatRule Resource

    Get an existing NatRule 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?: NatRuleState, opts?: CustomResourceOptions): NatRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            backend_ip_configuration_id: Optional[str] = None,
            backend_port: Optional[int] = None,
            enable_floating_ip: Optional[bool] = None,
            enable_tcp_reset: Optional[bool] = None,
            frontend_ip_configuration_id: Optional[str] = None,
            frontend_ip_configuration_name: Optional[str] = None,
            frontend_port: Optional[int] = None,
            idle_timeout_in_minutes: Optional[int] = None,
            loadbalancer_id: Optional[str] = None,
            name: Optional[str] = None,
            protocol: Optional[str] = None,
            resource_group_name: Optional[str] = None) -> NatRule
    func GetNatRule(ctx *Context, name string, id IDInput, state *NatRuleState, opts ...ResourceOption) (*NatRule, error)
    public static NatRule Get(string name, Input<string> id, NatRuleState? state, CustomResourceOptions? opts = null)
    public static NatRule get(String name, Output<String> id, NatRuleState state, CustomResourceOptions options)
    resources:  _:    type: azure:lb:NatRule    get:      id: ${id}
    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.
    The following state arguments are supported:
    BackendIpConfigurationId string
    BackendPort int
    The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive.
    EnableFloatingIp bool
    Are the Floating IPs enabled for this Load Balancer Rule? A "floating” IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to false.
    EnableTcpReset bool
    Is TCP Reset enabled for this Load Balancer Rule? Defaults to false.
    FrontendIpConfigurationId string
    FrontendIpConfigurationName string
    The name of the frontend IP configuration exposing this rule.
    FrontendPort int
    The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 0 and 65534, inclusive.
    IdleTimeoutInMinutes int
    Specifies the idle timeout in minutes for TCP connections. Valid values are between 4 and 30 minutes. Defaults to 4 minutes.
    LoadbalancerId string
    The ID of the Load Balancer in which to create the NAT Rule.
    Name string
    Specifies the name of the NAT Rule.
    Protocol string
    The transport protocol for the external endpoint. Possible values are Udp, Tcp or All.
    ResourceGroupName string
    The name of the resource group in which to create the resource.
    BackendIpConfigurationId string
    BackendPort int
    The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive.
    EnableFloatingIp bool
    Are the Floating IPs enabled for this Load Balancer Rule? A "floating” IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to false.
    EnableTcpReset bool
    Is TCP Reset enabled for this Load Balancer Rule? Defaults to false.
    FrontendIpConfigurationId string
    FrontendIpConfigurationName string
    The name of the frontend IP configuration exposing this rule.
    FrontendPort int
    The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 0 and 65534, inclusive.
    IdleTimeoutInMinutes int
    Specifies the idle timeout in minutes for TCP connections. Valid values are between 4 and 30 minutes. Defaults to 4 minutes.
    LoadbalancerId string
    The ID of the Load Balancer in which to create the NAT Rule.
    Name string
    Specifies the name of the NAT Rule.
    Protocol string
    The transport protocol for the external endpoint. Possible values are Udp, Tcp or All.
    ResourceGroupName string
    The name of the resource group in which to create the resource.
    backendIpConfigurationId String
    backendPort Integer
    The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive.
    enableFloatingIp Boolean
    Are the Floating IPs enabled for this Load Balancer Rule? A "floating” IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to false.
    enableTcpReset Boolean
    Is TCP Reset enabled for this Load Balancer Rule? Defaults to false.
    frontendIpConfigurationId String
    frontendIpConfigurationName String
    The name of the frontend IP configuration exposing this rule.
    frontendPort Integer
    The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 0 and 65534, inclusive.
    idleTimeoutInMinutes Integer
    Specifies the idle timeout in minutes for TCP connections. Valid values are between 4 and 30 minutes. Defaults to 4 minutes.
    loadbalancerId String
    The ID of the Load Balancer in which to create the NAT Rule.
    name String
    Specifies the name of the NAT Rule.
    protocol String
    The transport protocol for the external endpoint. Possible values are Udp, Tcp or All.
    resourceGroupName String
    The name of the resource group in which to create the resource.
    backendIpConfigurationId string
    backendPort number
    The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive.
    enableFloatingIp boolean
    Are the Floating IPs enabled for this Load Balancer Rule? A "floating” IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to false.
    enableTcpReset boolean
    Is TCP Reset enabled for this Load Balancer Rule? Defaults to false.
    frontendIpConfigurationId string
    frontendIpConfigurationName string
    The name of the frontend IP configuration exposing this rule.
    frontendPort number
    The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 0 and 65534, inclusive.
    idleTimeoutInMinutes number
    Specifies the idle timeout in minutes for TCP connections. Valid values are between 4 and 30 minutes. Defaults to 4 minutes.
    loadbalancerId string
    The ID of the Load Balancer in which to create the NAT Rule.
    name string
    Specifies the name of the NAT Rule.
    protocol string
    The transport protocol for the external endpoint. Possible values are Udp, Tcp or All.
    resourceGroupName string
    The name of the resource group in which to create the resource.
    backend_ip_configuration_id str
    backend_port int
    The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive.
    enable_floating_ip bool
    Are the Floating IPs enabled for this Load Balancer Rule? A "floating” IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to false.
    enable_tcp_reset bool
    Is TCP Reset enabled for this Load Balancer Rule? Defaults to false.
    frontend_ip_configuration_id str
    frontend_ip_configuration_name str
    The name of the frontend IP configuration exposing this rule.
    frontend_port int
    The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 0 and 65534, inclusive.
    idle_timeout_in_minutes int
    Specifies the idle timeout in minutes for TCP connections. Valid values are between 4 and 30 minutes. Defaults to 4 minutes.
    loadbalancer_id str
    The ID of the Load Balancer in which to create the NAT Rule.
    name str
    Specifies the name of the NAT Rule.
    protocol str
    The transport protocol for the external endpoint. Possible values are Udp, Tcp or All.
    resource_group_name str
    The name of the resource group in which to create the resource.
    backendIpConfigurationId String
    backendPort Number
    The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive.
    enableFloatingIp Boolean
    Are the Floating IPs enabled for this Load Balancer Rule? A "floating” IP is reassigned to a secondary server in case the primary server fails. Required to configure a SQL AlwaysOn Availability Group. Defaults to false.
    enableTcpReset Boolean
    Is TCP Reset enabled for this Load Balancer Rule? Defaults to false.
    frontendIpConfigurationId String
    frontendIpConfigurationName String
    The name of the frontend IP configuration exposing this rule.
    frontendPort Number
    The port for the external endpoint. Port numbers for each Rule must be unique within the Load Balancer. Possible values range between 0 and 65534, inclusive.
    idleTimeoutInMinutes Number
    Specifies the idle timeout in minutes for TCP connections. Valid values are between 4 and 30 minutes. Defaults to 4 minutes.
    loadbalancerId String
    The ID of the Load Balancer in which to create the NAT Rule.
    name String
    Specifies the name of the NAT Rule.
    protocol String
    The transport protocol for the external endpoint. Possible values are Udp, Tcp or All.
    resourceGroupName String
    The name of the resource group in which to create the resource.

    Import

    Load Balancer NAT Rules can be imported using the resource id, e.g.

     $ pulumi import azure:lb/natRule:NatRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/loadBalancers/lb1/inboundNatRules/rule1
    

    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.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.