RuleArgs

data class RuleArgs(val backendAddressPoolIds: Output<List<String>>? = null, val backendPort: Output<Int>? = null, val disableOutboundSnat: Output<Boolean>? = null, val enableFloatingIp: Output<Boolean>? = null, val enableTcpReset: Output<Boolean>? = null, val frontendIpConfigurationName: Output<String>? = null, val frontendPort: Output<Int>? = null, val idleTimeoutInMinutes: Output<Int>? = null, val loadDistribution: Output<String>? = null, val loadbalancerId: Output<String>? = null, val name: Output<String>? = null, val probeId: Output<String>? = null, val protocol: Output<String>? = null) : ConvertibleToJava<RuleArgs>

Manages a Load Balancer Rule.

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

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.PublicIp;
import com.pulumi.azure.network.PublicIpArgs;
import com.pulumi.azure.lb.LoadBalancer;
import com.pulumi.azure.lb.LoadBalancerArgs;
import com.pulumi.azure.lb.inputs.LoadBalancerFrontendIpConfigurationArgs;
import com.pulumi.azure.lb.Rule;
import com.pulumi.azure.lb.RuleArgs;
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 examplePublicIp = new PublicIp("examplePublicIp", PublicIpArgs.builder()
.location("West US")
.resourceGroupName(exampleResourceGroup.name())
.allocationMethod("Static")
.build());
var exampleLoadBalancer = new LoadBalancer("exampleLoadBalancer", LoadBalancerArgs.builder()
.location("West US")
.resourceGroupName(exampleResourceGroup.name())
.frontendIpConfigurations(LoadBalancerFrontendIpConfigurationArgs.builder()
.name("PublicIPAddress")
.publicIpAddressId(examplePublicIp.id())
.build())
.build());
var exampleRule = new Rule("exampleRule", RuleArgs.builder()
.loadbalancerId(exampleLoadBalancer.id())
.protocol("Tcp")
.frontendPort(3389)
.backendPort(3389)
.frontendIpConfigurationName("PublicIPAddress")
.build());
}
}

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

Constructors

Link copied to clipboard
fun RuleArgs(backendAddressPoolIds: Output<List<String>>? = null, backendPort: Output<Int>? = null, disableOutboundSnat: Output<Boolean>? = null, enableFloatingIp: Output<Boolean>? = null, enableTcpReset: Output<Boolean>? = null, frontendIpConfigurationName: Output<String>? = null, frontendPort: Output<Int>? = null, idleTimeoutInMinutes: Output<Int>? = null, loadDistribution: Output<String>? = null, loadbalancerId: Output<String>? = null, name: Output<String>? = null, probeId: Output<String>? = null, protocol: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): RuleArgs

Properties

Link copied to clipboard
val backendAddressPoolIds: Output<List<String>>? = null

A list of reference to a Backend Address Pool over which this Load Balancing Rule operates.

Link copied to clipboard
val backendPort: Output<Int>? = null

The port used for internal connections on the endpoint. Possible values range between 0 and 65535, inclusive.

Link copied to clipboard
val disableOutboundSnat: Output<Boolean>? = null

Is snat enabled for this Load Balancer Rule? Default false.

Link copied to clipboard
val enableFloatingIp: Output<Boolean>? = null

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.

Link copied to clipboard
val enableTcpReset: Output<Boolean>? = null

Is TCP Reset enabled for this Load Balancer Rule?

Link copied to clipboard
val frontendIpConfigurationName: Output<String>? = null

The name of the frontend IP configuration to which the rule is associated.

Link copied to clipboard
val frontendPort: Output<Int>? = null

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.

Link copied to clipboard
val idleTimeoutInMinutes: Output<Int>? = null

Specifies the idle timeout in minutes for TCP connections. Valid values are between 4 and 30 minutes. Defaults to 4 minutes.

Link copied to clipboard
val loadbalancerId: Output<String>? = null

The ID of the Load Balancer in which to create the Rule. Changing this forces a new resource to be created.

Link copied to clipboard
val loadDistribution: Output<String>? = null

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 called None, Client IP and Client IP and Protocol respectively.

Link copied to clipboard
val name: Output<String>? = null

Specifies the name of the LB Rule. Changing this forces a new resource to be created.

Link copied to clipboard
val probeId: Output<String>? = null

A reference to a Probe used by this Load Balancing Rule.

Link copied to clipboard
val protocol: Output<String>? = null

The transport protocol for the external endpoint. Possible values are Tcp, Udp or All.