NatPoolArgs

data class NatPoolArgs(val backendPort: Output<Int>? = null, val floatingIpEnabled: Output<Boolean>? = null, val frontendIpConfigurationName: Output<String>? = null, val frontendPortEnd: Output<Int>? = null, val frontendPortStart: Output<Int>? = null, val idleTimeoutInMinutes: Output<Int>? = null, val loadbalancerId: Output<String>? = null, val name: Output<String>? = null, val protocol: Output<String>? = null, val resourceGroupName: Output<String>? = null, val tcpResetEnabled: Output<Boolean>? = null) : ConvertibleToJava<NatPoolArgs>

Manages a Load Balancer NAT pool.

NOTE: This resource cannot be used with with virtual machines, instead use the azure.lb.NatRule resource. 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.NatPool;
import com.pulumi.azure.lb.NatPoolArgs;
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(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.allocationMethod("Static")
.build());
var exampleLoadBalancer = new LoadBalancer("exampleLoadBalancer", LoadBalancerArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.frontendIpConfigurations(LoadBalancerFrontendIpConfigurationArgs.builder()
.name("PublicIPAddress")
.publicIpAddressId(examplePublicIp.id())
.build())
.build());
var exampleNatPool = new NatPool("exampleNatPool", NatPoolArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.loadbalancerId(exampleLoadBalancer.id())
.protocol("Tcp")
.frontendPortStart(80)
.frontendPortEnd(81)
.backendPort(8080)
.frontendIpConfigurationName("PublicIPAddress")
.build());
}
}

Import

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

$ pulumi import azure:lb/natPool:NatPool example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/loadBalancers/lb1/inboundNatPools/pool1

Constructors

Link copied to clipboard
fun NatPoolArgs(backendPort: Output<Int>? = null, floatingIpEnabled: Output<Boolean>? = null, frontendIpConfigurationName: Output<String>? = null, frontendPortEnd: Output<Int>? = null, frontendPortStart: Output<Int>? = null, idleTimeoutInMinutes: Output<Int>? = null, loadbalancerId: Output<String>? = null, name: Output<String>? = null, protocol: Output<String>? = null, resourceGroupName: Output<String>? = null, tcpResetEnabled: Output<Boolean>? = null)

Functions

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

Properties

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

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

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

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.

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

The name of the frontend IP configuration exposing this rule.

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

The last port number in the range of external ports that will be used to provide Inbound NAT to NICs associated with this Load Balancer. Possible values range between 1 and 65534, inclusive.

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

The first port number in the range of external ports that will be used to provide Inbound NAT to NICs associated with this Load Balancer. Possible values range between 1 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. Defaults to 4.

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

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

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

Specifies the name of the NAT pool. Changing this forces a new resource to be created.

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

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

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

The name of the resource group in which to create the resource. Changing this forces a new resource to be created.

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

Is TCP Reset enabled for this Load Balancer Rule?