We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
Manages a Load Balancer Rule.
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 exampleRule = new Azure.Lb.Rule("exampleRule", new Azure.Lb.RuleArgs
{
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.NewRule(ctx, "exampleRule", &lb.RuleArgs{
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 exampleRule = new azure.lb.Rule("exampleRule", {
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_rule = azure.lb.Rule("exampleRule",
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 Rule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Rule(name: string, args: RuleArgs, opts?: CustomResourceOptions);@overload
def Rule(resource_name: str,
args: RuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Rule(resource_name: str,
opts: Optional[ResourceOptions] = None,
frontend_ip_configuration_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
backend_port: Optional[int] = None,
protocol: Optional[str] = None,
loadbalancer_id: Optional[str] = None,
frontend_port: Optional[int] = None,
disable_outbound_snat: Optional[bool] = None,
enable_tcp_reset: Optional[bool] = None,
idle_timeout_in_minutes: Optional[int] = None,
load_distribution: Optional[str] = None,
enable_floating_ip: Optional[bool] = None,
name: Optional[str] = None,
probe_id: Optional[str] = None,
backend_address_pool_id: Optional[str] = None,
backend_address_pool_ids: Optional[Sequence[str]] = None)func NewRule(ctx *Context, name string, args RuleArgs, opts ...ResourceOption) (*Rule, error)public Rule(string name, RuleArgs args, CustomResourceOptions? opts = null)type: azure:lb:Rule
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 RuleArgs
- 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 RuleArgs
- 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 RuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RuleArgs
- 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 ruleResource = new Azure.Lb.Rule("ruleResource", new()
{
FrontendIpConfigurationName = "string",
ResourceGroupName = "string",
BackendPort = 0,
Protocol = "string",
LoadbalancerId = "string",
FrontendPort = 0,
DisableOutboundSnat = false,
EnableTcpReset = false,
IdleTimeoutInMinutes = 0,
LoadDistribution = "string",
EnableFloatingIp = false,
Name = "string",
ProbeId = "string",
BackendAddressPoolIds = new[]
{
"string",
},
});
example, err := lb.NewRule(ctx, "ruleResource", &lb.RuleArgs{
FrontendIpConfigurationName: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
BackendPort: pulumi.Int(0),
Protocol: pulumi.String("string"),
LoadbalancerId: pulumi.String("string"),
FrontendPort: pulumi.Int(0),
DisableOutboundSnat: pulumi.Bool(false),
EnableTcpReset: pulumi.Bool(false),
IdleTimeoutInMinutes: pulumi.Int(0),
LoadDistribution: pulumi.String("string"),
EnableFloatingIp: pulumi.Bool(false),
Name: pulumi.String("string"),
ProbeId: pulumi.String("string"),
BackendAddressPoolIds: pulumi.StringArray{
pulumi.String("string"),
},
})
var ruleResource = new Rule("ruleResource", RuleArgs.builder()
.frontendIpConfigurationName("string")
.resourceGroupName("string")
.backendPort(0)
.protocol("string")
.loadbalancerId("string")
.frontendPort(0)
.disableOutboundSnat(false)
.enableTcpReset(false)
.idleTimeoutInMinutes(0)
.loadDistribution("string")
.enableFloatingIp(false)
.name("string")
.probeId("string")
.backendAddressPoolIds("string")
.build());
rule_resource = azure.lb.Rule("ruleResource",
frontend_ip_configuration_name="string",
resource_group_name="string",
backend_port=0,
protocol="string",
loadbalancer_id="string",
frontend_port=0,
disable_outbound_snat=False,
enable_tcp_reset=False,
idle_timeout_in_minutes=0,
load_distribution="string",
enable_floating_ip=False,
name="string",
probe_id="string",
backend_address_pool_ids=["string"])
const ruleResource = new azure.lb.Rule("ruleResource", {
frontendIpConfigurationName: "string",
resourceGroupName: "string",
backendPort: 0,
protocol: "string",
loadbalancerId: "string",
frontendPort: 0,
disableOutboundSnat: false,
enableTcpReset: false,
idleTimeoutInMinutes: 0,
loadDistribution: "string",
enableFloatingIp: false,
name: "string",
probeId: "string",
backendAddressPoolIds: ["string"],
});
type: azure:lb:Rule
properties:
backendAddressPoolIds:
- string
backendPort: 0
disableOutboundSnat: false
enableFloatingIp: false
enableTcpReset: false
frontendIpConfigurationName: string
frontendPort: 0
idleTimeoutInMinutes: 0
loadDistribution: string
loadbalancerId: string
name: string
probeId: string
protocol: string
resourceGroupName: string
Rule 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 Rule resource accepts the following input properties:
- Backend
Port int - The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive.
- Frontend
Ip stringConfiguration Name - The name of the frontend IP configuration to which the rule is associated.
- 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 string - The ID of the Load Balancer in which to create the Rule.
- Protocol string
- The transport protocol for the external endpoint. Possible values are
Tcp,UdporAll. - Resource
Group stringName - The name of the resource group in which to create the resource.
- Backend
Address stringPool Id - Backend
Address List<string>Pool Ids - A list of reference to a Backend Address Pool over which this Load Balancing Rule operates.
- Disable
Outbound boolSnat - Is snat enabled for this Load Balancer Rule? Default
false. - Enable
Floating boolIp - Are the Floating IPs enabled for this Load Balncer 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 boolReset - Is TCP Reset enabled for this Load Balancer Rule? Defaults to
false. - Idle
Timeout intIn Minutes - Specifies the idle timeout in minutes for TCP connections. Valid values are between
4and30minutes. Defaults to4minutes. - Load
Distribution string - Specifies the load balancing distribution type to be used by the Load Balancer. Possible values are:
Default– The load balancer is configured to use a 5 tuple hash to map traffic to available servers.SourceIP– The load balancer is configured to use a 2 tuple hash to map traffic to available servers.SourceIPProtocol– The load balancer is configured to use a 3 tuple hash to map traffic to available servers. Also known as Session Persistence, where the options are calledNone,Client IPandClient IP and Protocolrespectively. - Name string
- Specifies the name of the LB Rule.
- Probe
Id string - A reference to a Probe used by this Load Balancing Rule.
- Backend
Port int - The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive.
- Frontend
Ip stringConfiguration Name - The name of the frontend IP configuration to which the rule is associated.
- 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 string - The ID of the Load Balancer in which to create the Rule.
- Protocol string
- The transport protocol for the external endpoint. Possible values are
Tcp,UdporAll. - Resource
Group stringName - The name of the resource group in which to create the resource.
- Backend
Address stringPool Id - Backend
Address []stringPool Ids - A list of reference to a Backend Address Pool over which this Load Balancing Rule operates.
- Disable
Outbound boolSnat - Is snat enabled for this Load Balancer Rule? Default
false. - Enable
Floating boolIp - Are the Floating IPs enabled for this Load Balncer 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 boolReset - Is TCP Reset enabled for this Load Balancer Rule? Defaults to
false. - Idle
Timeout intIn Minutes - Specifies the idle timeout in minutes for TCP connections. Valid values are between
4and30minutes. Defaults to4minutes. - Load
Distribution string - Specifies the load balancing distribution type to be used by the Load Balancer. Possible values are:
Default– The load balancer is configured to use a 5 tuple hash to map traffic to available servers.SourceIP– The load balancer is configured to use a 2 tuple hash to map traffic to available servers.SourceIPProtocol– The load balancer is configured to use a 3 tuple hash to map traffic to available servers. Also known as Session Persistence, where the options are calledNone,Client IPandClient IP and Protocolrespectively. - Name string
- Specifies the name of the LB Rule.
- Probe
Id string - A reference to a Probe used by this Load Balancing Rule.
- backend
Port Integer - The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive.
- frontend
Ip StringConfiguration Name - The name of the frontend IP configuration to which the rule is associated.
- frontend
Port 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.
- loadbalancer
Id String - The ID of the Load Balancer in which to create the Rule.
- protocol String
- The transport protocol for the external endpoint. Possible values are
Tcp,UdporAll. - resource
Group StringName - The name of the resource group in which to create the resource.
- backend
Address StringPool Id - backend
Address List<String>Pool Ids - A list of reference to a Backend Address Pool over which this Load Balancing Rule operates.
- disable
Outbound BooleanSnat - Is snat enabled for this Load Balancer Rule? Default
false. - enable
Floating BooleanIp - Are the Floating IPs enabled for this Load Balncer 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 BooleanReset - Is TCP Reset enabled for this Load Balancer Rule? Defaults to
false. - idle
Timeout IntegerIn Minutes - Specifies the idle timeout in minutes for TCP connections. Valid values are between
4and30minutes. Defaults to4minutes. - load
Distribution String - Specifies the load balancing distribution type to be used by the Load Balancer. Possible values are:
Default– The load balancer is configured to use a 5 tuple hash to map traffic to available servers.SourceIP– The load balancer is configured to use a 2 tuple hash to map traffic to available servers.SourceIPProtocol– The load balancer is configured to use a 3 tuple hash to map traffic to available servers. Also known as Session Persistence, where the options are calledNone,Client IPandClient IP and Protocolrespectively. - name String
- Specifies the name of the LB Rule.
- probe
Id String - A reference to a Probe used by this Load Balancing Rule.
- backend
Port number - The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive.
- frontend
Ip stringConfiguration Name - The name of the frontend IP configuration to which the rule is associated.
- frontend
Port 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.
- loadbalancer
Id string - The ID of the Load Balancer in which to create the Rule.
- protocol string
- The transport protocol for the external endpoint. Possible values are
Tcp,UdporAll. - resource
Group stringName - The name of the resource group in which to create the resource.
- backend
Address stringPool Id - backend
Address string[]Pool Ids - A list of reference to a Backend Address Pool over which this Load Balancing Rule operates.
- disable
Outbound booleanSnat - Is snat enabled for this Load Balancer Rule? Default
false. - enable
Floating booleanIp - Are the Floating IPs enabled for this Load Balncer 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 booleanReset - Is TCP Reset enabled for this Load Balancer Rule? Defaults to
false. - idle
Timeout numberIn Minutes - Specifies the idle timeout in minutes for TCP connections. Valid values are between
4and30minutes. Defaults to4minutes. - load
Distribution string - Specifies the load balancing distribution type to be used by the Load Balancer. Possible values are:
Default– The load balancer is configured to use a 5 tuple hash to map traffic to available servers.SourceIP– The load balancer is configured to use a 2 tuple hash to map traffic to available servers.SourceIPProtocol– The load balancer is configured to use a 3 tuple hash to map traffic to available servers. Also known as Session Persistence, where the options are calledNone,Client IPandClient IP and Protocolrespectively. - name string
- Specifies the name of the LB Rule.
- probe
Id string - A reference to a Probe used by this Load Balancing Rule.
- backend_
port int - The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive.
- frontend_
ip_ strconfiguration_ name - The name of the frontend IP configuration to which the rule is associated.
- 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 Rule.
- protocol str
- The transport protocol for the external endpoint. Possible values are
Tcp,UdporAll. - resource_
group_ strname - The name of the resource group in which to create the resource.
- backend_
address_ strpool_ id - backend_
address_ Sequence[str]pool_ ids - A list of reference to a Backend Address Pool over which this Load Balancing Rule operates.
- disable_
outbound_ boolsnat - Is snat enabled for this Load Balancer Rule? Default
false. - enable_
floating_ boolip - Are the Floating IPs enabled for this Load Balncer 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_ boolreset - Is TCP Reset enabled for this Load Balancer Rule? Defaults to
false. - idle_
timeout_ intin_ minutes - Specifies the idle timeout in minutes for TCP connections. Valid values are between
4and30minutes. Defaults to4minutes. - load_
distribution str - Specifies the load balancing distribution type to be used by the Load Balancer. Possible values are:
Default– The load balancer is configured to use a 5 tuple hash to map traffic to available servers.SourceIP– The load balancer is configured to use a 2 tuple hash to map traffic to available servers.SourceIPProtocol– The load balancer is configured to use a 3 tuple hash to map traffic to available servers. Also known as Session Persistence, where the options are calledNone,Client IPandClient IP and Protocolrespectively. - name str
- Specifies the name of the LB Rule.
- probe_
id str - A reference to a Probe used by this Load Balancing Rule.
- backend
Port Number - The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive.
- frontend
Ip StringConfiguration Name - The name of the frontend IP configuration to which the rule is associated.
- frontend
Port 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.
- loadbalancer
Id String - The ID of the Load Balancer in which to create the Rule.
- protocol String
- The transport protocol for the external endpoint. Possible values are
Tcp,UdporAll. - resource
Group StringName - The name of the resource group in which to create the resource.
- backend
Address StringPool Id - backend
Address List<String>Pool Ids - A list of reference to a Backend Address Pool over which this Load Balancing Rule operates.
- disable
Outbound BooleanSnat - Is snat enabled for this Load Balancer Rule? Default
false. - enable
Floating BooleanIp - Are the Floating IPs enabled for this Load Balncer 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 BooleanReset - Is TCP Reset enabled for this Load Balancer Rule? Defaults to
false. - idle
Timeout NumberIn Minutes - Specifies the idle timeout in minutes for TCP connections. Valid values are between
4and30minutes. Defaults to4minutes. - load
Distribution String - Specifies the load balancing distribution type to be used by the Load Balancer. Possible values are:
Default– The load balancer is configured to use a 5 tuple hash to map traffic to available servers.SourceIP– The load balancer is configured to use a 2 tuple hash to map traffic to available servers.SourceIPProtocol– The load balancer is configured to use a 3 tuple hash to map traffic to available servers. Also known as Session Persistence, where the options are calledNone,Client IPandClient IP and Protocolrespectively. - name String
- Specifies the name of the LB Rule.
- probe
Id String - A reference to a Probe used by this Load Balancing Rule.
Outputs
All input properties are implicitly available as output properties. Additionally, the Rule resource produces the following output properties:
- Frontend
Ip stringConfiguration Id - Id string
- The provider-assigned unique ID for this managed resource.
- Frontend
Ip stringConfiguration Id - Id string
- The provider-assigned unique ID for this managed resource.
- frontend
Ip StringConfiguration Id - id String
- The provider-assigned unique ID for this managed resource.
- frontend
Ip stringConfiguration Id - id string
- The provider-assigned unique ID for this managed resource.
- frontend_
ip_ strconfiguration_ id - id str
- The provider-assigned unique ID for this managed resource.
- frontend
Ip StringConfiguration Id - id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Rule Resource
Get an existing Rule 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?: RuleState, opts?: CustomResourceOptions): Rule@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
backend_address_pool_id: Optional[str] = None,
backend_address_pool_ids: Optional[Sequence[str]] = None,
backend_port: Optional[int] = None,
disable_outbound_snat: Optional[bool] = 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,
load_distribution: Optional[str] = None,
loadbalancer_id: Optional[str] = None,
name: Optional[str] = None,
probe_id: Optional[str] = None,
protocol: Optional[str] = None,
resource_group_name: Optional[str] = None) -> Rulefunc GetRule(ctx *Context, name string, id IDInput, state *RuleState, opts ...ResourceOption) (*Rule, error)public static Rule Get(string name, Input<string> id, RuleState? state, CustomResourceOptions? opts = null)public static Rule get(String name, Output<String> id, RuleState state, CustomResourceOptions options)resources: _: type: azure:lb:Rule 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.
- Backend
Address stringPool Id - Backend
Address List<string>Pool Ids - A list of reference to a Backend Address Pool over which this Load Balancing Rule operates.
- Backend
Port int - The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive.
- Disable
Outbound boolSnat - Is snat enabled for this Load Balancer Rule? Default
false. - Enable
Floating boolIp - Are the Floating IPs enabled for this Load Balncer 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 boolReset - Is TCP Reset enabled for this Load Balancer Rule? Defaults to
false. - Frontend
Ip stringConfiguration Id - Frontend
Ip stringConfiguration Name - The name of the frontend IP configuration to which the rule is associated.
- 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 intIn Minutes - Specifies the idle timeout in minutes for TCP connections. Valid values are between
4and30minutes. Defaults to4minutes. - Load
Distribution string - Specifies the load balancing distribution type to be used by the Load Balancer. Possible values are:
Default– The load balancer is configured to use a 5 tuple hash to map traffic to available servers.SourceIP– The load balancer is configured to use a 2 tuple hash to map traffic to available servers.SourceIPProtocol– The load balancer is configured to use a 3 tuple hash to map traffic to available servers. Also known as Session Persistence, where the options are calledNone,Client IPandClient IP and Protocolrespectively. - Loadbalancer
Id string - The ID of the Load Balancer in which to create the Rule.
- Name string
- Specifies the name of the LB Rule.
- Probe
Id string - A reference to a Probe used by this Load Balancing Rule.
- Protocol string
- The transport protocol for the external endpoint. Possible values are
Tcp,UdporAll. - Resource
Group stringName - The name of the resource group in which to create the resource.
- Backend
Address stringPool Id - Backend
Address []stringPool Ids - A list of reference to a Backend Address Pool over which this Load Balancing Rule operates.
- Backend
Port int - The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive.
- Disable
Outbound boolSnat - Is snat enabled for this Load Balancer Rule? Default
false. - Enable
Floating boolIp - Are the Floating IPs enabled for this Load Balncer 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 boolReset - Is TCP Reset enabled for this Load Balancer Rule? Defaults to
false. - Frontend
Ip stringConfiguration Id - Frontend
Ip stringConfiguration Name - The name of the frontend IP configuration to which the rule is associated.
- 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 intIn Minutes - Specifies the idle timeout in minutes for TCP connections. Valid values are between
4and30minutes. Defaults to4minutes. - Load
Distribution string - Specifies the load balancing distribution type to be used by the Load Balancer. Possible values are:
Default– The load balancer is configured to use a 5 tuple hash to map traffic to available servers.SourceIP– The load balancer is configured to use a 2 tuple hash to map traffic to available servers.SourceIPProtocol– The load balancer is configured to use a 3 tuple hash to map traffic to available servers. Also known as Session Persistence, where the options are calledNone,Client IPandClient IP and Protocolrespectively. - Loadbalancer
Id string - The ID of the Load Balancer in which to create the Rule.
- Name string
- Specifies the name of the LB Rule.
- Probe
Id string - A reference to a Probe used by this Load Balancing Rule.
- Protocol string
- The transport protocol for the external endpoint. Possible values are
Tcp,UdporAll. - Resource
Group stringName - The name of the resource group in which to create the resource.
- backend
Address StringPool Id - backend
Address List<String>Pool Ids - A list of reference to a Backend Address Pool over which this Load Balancing Rule operates.
- backend
Port Integer - The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive.
- disable
Outbound BooleanSnat - Is snat enabled for this Load Balancer Rule? Default
false. - enable
Floating BooleanIp - Are the Floating IPs enabled for this Load Balncer 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 BooleanReset - Is TCP Reset enabled for this Load Balancer Rule? Defaults to
false. - frontend
Ip StringConfiguration Id - frontend
Ip StringConfiguration Name - The name of the frontend IP configuration to which the rule is associated.
- frontend
Port 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.
- idle
Timeout IntegerIn Minutes - Specifies the idle timeout in minutes for TCP connections. Valid values are between
4and30minutes. Defaults to4minutes. - load
Distribution String - Specifies the load balancing distribution type to be used by the Load Balancer. Possible values are:
Default– The load balancer is configured to use a 5 tuple hash to map traffic to available servers.SourceIP– The load balancer is configured to use a 2 tuple hash to map traffic to available servers.SourceIPProtocol– The load balancer is configured to use a 3 tuple hash to map traffic to available servers. Also known as Session Persistence, where the options are calledNone,Client IPandClient IP and Protocolrespectively. - loadbalancer
Id String - The ID of the Load Balancer in which to create the Rule.
- name String
- Specifies the name of the LB Rule.
- probe
Id String - A reference to a Probe used by this Load Balancing Rule.
- protocol String
- The transport protocol for the external endpoint. Possible values are
Tcp,UdporAll. - resource
Group StringName - The name of the resource group in which to create the resource.
- backend
Address stringPool Id - backend
Address string[]Pool Ids - A list of reference to a Backend Address Pool over which this Load Balancing Rule operates.
- backend
Port number - The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive.
- disable
Outbound booleanSnat - Is snat enabled for this Load Balancer Rule? Default
false. - enable
Floating booleanIp - Are the Floating IPs enabled for this Load Balncer 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 booleanReset - Is TCP Reset enabled for this Load Balancer Rule? Defaults to
false. - frontend
Ip stringConfiguration Id - frontend
Ip stringConfiguration Name - The name of the frontend IP configuration to which the rule is associated.
- frontend
Port 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.
- idle
Timeout numberIn Minutes - Specifies the idle timeout in minutes for TCP connections. Valid values are between
4and30minutes. Defaults to4minutes. - load
Distribution string - Specifies the load balancing distribution type to be used by the Load Balancer. Possible values are:
Default– The load balancer is configured to use a 5 tuple hash to map traffic to available servers.SourceIP– The load balancer is configured to use a 2 tuple hash to map traffic to available servers.SourceIPProtocol– The load balancer is configured to use a 3 tuple hash to map traffic to available servers. Also known as Session Persistence, where the options are calledNone,Client IPandClient IP and Protocolrespectively. - loadbalancer
Id string - The ID of the Load Balancer in which to create the Rule.
- name string
- Specifies the name of the LB Rule.
- probe
Id string - A reference to a Probe used by this Load Balancing Rule.
- protocol string
- The transport protocol for the external endpoint. Possible values are
Tcp,UdporAll. - resource
Group stringName - The name of the resource group in which to create the resource.
- backend_
address_ strpool_ id - backend_
address_ Sequence[str]pool_ ids - A list of reference to a Backend Address Pool over which this Load Balancing Rule operates.
- backend_
port int - The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive.
- disable_
outbound_ boolsnat - Is snat enabled for this Load Balancer Rule? Default
false. - enable_
floating_ boolip - Are the Floating IPs enabled for this Load Balncer 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_ boolreset - Is TCP Reset enabled for this Load Balancer Rule? Defaults to
false. - frontend_
ip_ strconfiguration_ id - frontend_
ip_ strconfiguration_ name - The name of the frontend IP configuration to which the rule is associated.
- 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_ intin_ minutes - Specifies the idle timeout in minutes for TCP connections. Valid values are between
4and30minutes. Defaults to4minutes. - load_
distribution str - Specifies the load balancing distribution type to be used by the Load Balancer. Possible values are:
Default– The load balancer is configured to use a 5 tuple hash to map traffic to available servers.SourceIP– The load balancer is configured to use a 2 tuple hash to map traffic to available servers.SourceIPProtocol– The load balancer is configured to use a 3 tuple hash to map traffic to available servers. Also known as Session Persistence, where the options are calledNone,Client IPandClient IP and Protocolrespectively. - loadbalancer_
id str - The ID of the Load Balancer in which to create the Rule.
- name str
- Specifies the name of the LB Rule.
- probe_
id str - A reference to a Probe used by this Load Balancing Rule.
- protocol str
- The transport protocol for the external endpoint. Possible values are
Tcp,UdporAll. - resource_
group_ strname - The name of the resource group in which to create the resource.
- backend
Address StringPool Id - backend
Address List<String>Pool Ids - A list of reference to a Backend Address Pool over which this Load Balancing Rule operates.
- backend
Port Number - The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive.
- disable
Outbound BooleanSnat - Is snat enabled for this Load Balancer Rule? Default
false. - enable
Floating BooleanIp - Are the Floating IPs enabled for this Load Balncer 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 BooleanReset - Is TCP Reset enabled for this Load Balancer Rule? Defaults to
false. - frontend
Ip StringConfiguration Id - frontend
Ip StringConfiguration Name - The name of the frontend IP configuration to which the rule is associated.
- frontend
Port 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.
- idle
Timeout NumberIn Minutes - Specifies the idle timeout in minutes for TCP connections. Valid values are between
4and30minutes. Defaults to4minutes. - load
Distribution String - Specifies the load balancing distribution type to be used by the Load Balancer. Possible values are:
Default– The load balancer is configured to use a 5 tuple hash to map traffic to available servers.SourceIP– The load balancer is configured to use a 2 tuple hash to map traffic to available servers.SourceIPProtocol– The load balancer is configured to use a 3 tuple hash to map traffic to available servers. Also known as Session Persistence, where the options are calledNone,Client IPandClient IP and Protocolrespectively. - loadbalancer
Id String - The ID of the Load Balancer in which to create the Rule.
- name String
- Specifies the name of the LB Rule.
- probe
Id String - A reference to a Probe used by this Load Balancing Rule.
- protocol String
- The transport protocol for the external endpoint. Possible values are
Tcp,UdporAll. - resource
Group StringName - The name of the resource group in which to create the resource.
Import
Load Balancer Rules can be imported using the resource id, e.g.
$ pulumi import azure:lb/rule:Rule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/loadBalancers/lb1/loadBalancingRules/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
azurermTerraform Provider.
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
