NatPool

class NatPool : KotlinCustomResource

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

Properties

Link copied to clipboard
val backendPort: Output<Int>

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

Link copied to clipboard

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
Link copied to clipboard

The name of the frontend IP configuration exposing this rule.

Link copied to clipboard
val frontendPortEnd: Output<Int>

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>

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 id: Output<String>
Link copied to clipboard

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>

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>

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

Link copied to clipboard
val protocol: Output<String>

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

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

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>?

Is TCP Reset enabled for this Load Balancer Rule?

Link copied to clipboard
val urn: Output<String>