1. Packages
  2. Ionoscloud
  3. API Docs
  4. nlb
  5. Balancer
IonosCloud v0.2.2 published on Monday, May 12, 2025 by ionos-cloud

ionoscloud.nlb.Balancer

Explore with Pulumi AI

ionoscloud logo
IonosCloud v0.2.2 published on Monday, May 12, 2025 by ionos-cloud

    Manages a Network Load Balancer on IonosCloud.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
    
    const example = new ionoscloud.compute.Datacenter("example", {
        name: "Datacenter Example",
        location: "us/las",
        description: "Datacenter Description",
        secAuthProtection: false,
    });
    const example1 = new ionoscloud.compute.Lan("example1", {
        datacenterId: example.id,
        "public": false,
        name: "Lan Example 1",
    });
    const example2 = new ionoscloud.compute.Lan("example2", {
        datacenterId: example.id,
        "public": false,
        name: "Lan Example 2",
    });
    const exampleBalancer = new ionoscloud.nlb.Balancer("example", {
        datacenterId: example.id,
        name: "example",
        listenerLan: example1.id,
        targetLan: example2.id,
        ips: ["10.12.118.224"],
        lbPrivateIps: ["10.13.72.225/24"],
        centralLogging: true,
        loggingFormat: "%{+Q}o %{-Q}ci - - [%trg] %r %ST %B \"\" \"\" %cp %ms %ft %b %s %TR %Tw %Tc %Tr %Ta %tsc %ac %fc %bc %sc %rc %sq %bq %CC %CS %hrl %hsl",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.compute.Datacenter("example",
        name="Datacenter Example",
        location="us/las",
        description="Datacenter Description",
        sec_auth_protection=False)
    example1 = ionoscloud.compute.Lan("example1",
        datacenter_id=example.id,
        public=False,
        name="Lan Example 1")
    example2 = ionoscloud.compute.Lan("example2",
        datacenter_id=example.id,
        public=False,
        name="Lan Example 2")
    example_balancer = ionoscloud.nlb.Balancer("example",
        datacenter_id=example.id,
        name="example",
        listener_lan=example1.id,
        target_lan=example2.id,
        ips=["10.12.118.224"],
        lb_private_ips=["10.13.72.225/24"],
        central_logging=True,
        logging_format="%{+Q}o %{-Q}ci - - [%trg] %r %ST %B \"\" \"\" %cp %ms %ft %b %s %TR %Tw %Tc %Tr %Ta %tsc %ac %fc %bc %sc %rc %sq %bq %CC %CS %hrl %hsl")
    
    package main
    
    import (
    	"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/compute"
    	"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/nlb"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := compute.NewDatacenter(ctx, "example", &compute.DatacenterArgs{
    			Name:              pulumi.String("Datacenter Example"),
    			Location:          pulumi.String("us/las"),
    			Description:       pulumi.String("Datacenter Description"),
    			SecAuthProtection: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		example1, err := compute.NewLan(ctx, "example1", &compute.LanArgs{
    			DatacenterId: example.ID(),
    			Public:       pulumi.Bool(false),
    			Name:         pulumi.String("Lan Example 1"),
    		})
    		if err != nil {
    			return err
    		}
    		example2, err := compute.NewLan(ctx, "example2", &compute.LanArgs{
    			DatacenterId: example.ID(),
    			Public:       pulumi.Bool(false),
    			Name:         pulumi.String("Lan Example 2"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = nlb.NewBalancer(ctx, "example", &nlb.BalancerArgs{
    			DatacenterId: example.ID(),
    			Name:         pulumi.String("example"),
    			ListenerLan:  example1.ID(),
    			TargetLan:    example2.ID(),
    			Ips: pulumi.StringArray{
    				pulumi.String("10.12.118.224"),
    			},
    			LbPrivateIps: pulumi.StringArray{
    				pulumi.String("10.13.72.225/24"),
    			},
    			CentralLogging: pulumi.Bool(true),
    			LoggingFormat:  pulumi.String("%{+Q}o %{-Q}ci - - [%trg] %r %ST %B \"\" \"\" %cp %ms %ft %b %s %TR %Tw %Tc %Tr %Ta %tsc %ac %fc %bc %sc %rc %sq %bq %CC %CS %hrl %hsl"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Ionoscloud.Compute.Datacenter("example", new()
        {
            Name = "Datacenter Example",
            Location = "us/las",
            Description = "Datacenter Description",
            SecAuthProtection = false,
        });
    
        var example1 = new Ionoscloud.Compute.Lan("example1", new()
        {
            DatacenterId = example.Id,
            Public = false,
            Name = "Lan Example 1",
        });
    
        var example2 = new Ionoscloud.Compute.Lan("example2", new()
        {
            DatacenterId = example.Id,
            Public = false,
            Name = "Lan Example 2",
        });
    
        var exampleBalancer = new Ionoscloud.Nlb.Balancer("example", new()
        {
            DatacenterId = example.Id,
            Name = "example",
            ListenerLan = example1.Id,
            TargetLan = example2.Id,
            Ips = new[]
            {
                "10.12.118.224",
            },
            LbPrivateIps = new[]
            {
                "10.13.72.225/24",
            },
            CentralLogging = true,
            LoggingFormat = "%{+Q}o %{-Q}ci - - [%trg] %r %ST %B \"\" \"\" %cp %ms %ft %b %s %TR %Tw %Tc %Tr %Ta %tsc %ac %fc %bc %sc %rc %sq %bq %CC %CS %hrl %hsl",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.compute.Datacenter;
    import com.pulumi.ionoscloud.compute.DatacenterArgs;
    import com.pulumi.ionoscloud.compute.Lan;
    import com.pulumi.ionoscloud.compute.LanArgs;
    import com.pulumi.ionoscloud.nlb.Balancer;
    import com.pulumi.ionoscloud.nlb.BalancerArgs;
    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 example = new Datacenter("example", DatacenterArgs.builder()
                .name("Datacenter Example")
                .location("us/las")
                .description("Datacenter Description")
                .secAuthProtection(false)
                .build());
    
            var example1 = new Lan("example1", LanArgs.builder()
                .datacenterId(example.id())
                .public_(false)
                .name("Lan Example 1")
                .build());
    
            var example2 = new Lan("example2", LanArgs.builder()
                .datacenterId(example.id())
                .public_(false)
                .name("Lan Example 2")
                .build());
    
            var exampleBalancer = new Balancer("exampleBalancer", BalancerArgs.builder()
                .datacenterId(example.id())
                .name("example")
                .listenerLan(example1.id())
                .targetLan(example2.id())
                .ips("10.12.118.224")
                .lbPrivateIps("10.13.72.225/24")
                .centralLogging(true)
                .loggingFormat("%{+Q}o %{-Q}ci - - [%trg] %r %ST %B \"\" \"\" %cp %ms %ft %b %s %TR %Tw %Tc %Tr %Ta %tsc %ac %fc %bc %sc %rc %sq %bq %CC %CS %hrl %hsl")
                .build());
    
        }
    }
    
    resources:
      example:
        type: ionoscloud:compute:Datacenter
        properties:
          name: Datacenter Example
          location: us/las
          description: Datacenter Description
          secAuthProtection: false
      example1:
        type: ionoscloud:compute:Lan
        properties:
          datacenterId: ${example.id}
          public: false
          name: Lan Example 1
      example2:
        type: ionoscloud:compute:Lan
        properties:
          datacenterId: ${example.id}
          public: false
          name: Lan Example 2
      exampleBalancer:
        type: ionoscloud:nlb:Balancer
        name: example
        properties:
          datacenterId: ${example.id}
          name: example
          listenerLan: ${example1.id}
          targetLan: ${example2.id}
          ips:
            - 10.12.118.224
          lbPrivateIps:
            - 10.13.72.225/24
          centralLogging: true
          loggingFormat: '%{+Q}o %{-Q}ci - - [%trg] %r %ST %B "" "" %cp %ms %ft %b %s %TR %Tw %Tc %Tr %Ta %tsc %ac %fc %bc %sc %rc %sq %bq %CC %CS %hrl %hsl'
    

    Example configuring Flowlog

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@ionos-cloud/sdk-pulumi";
    
    const example = new ionoscloud.nlb.Balancer("example", {
        datacenterId: exampleIonoscloudDatacenter.id,
        name: "nlb with flowlog",
        listenerLan: example1.id,
        targetLan: example2.id,
        ips: ["10.12.118.224"],
        lbPrivateIps: ["10.13.72.225/24"],
        flowlog: {
            action: "ALL",
            bucket: "flowlog-bucket",
            direction: "INGRESS",
            name: "flowlog",
        },
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.nlb.Balancer("example",
        datacenter_id=example_ionoscloud_datacenter["id"],
        name="nlb with flowlog",
        listener_lan=example1["id"],
        target_lan=example2["id"],
        ips=["10.12.118.224"],
        lb_private_ips=["10.13.72.225/24"],
        flowlog={
            "action": "ALL",
            "bucket": "flowlog-bucket",
            "direction": "INGRESS",
            "name": "flowlog",
        })
    
    package main
    
    import (
    	"github.com/ionos-cloud/pulumi-ionoscloud/sdk/go/ionoscloud/nlb"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := nlb.NewBalancer(ctx, "example", &nlb.BalancerArgs{
    			DatacenterId: pulumi.Any(exampleIonoscloudDatacenter.Id),
    			Name:         pulumi.String("nlb with flowlog"),
    			ListenerLan:  pulumi.Any(example1.Id),
    			TargetLan:    pulumi.Any(example2.Id),
    			Ips: pulumi.StringArray{
    				pulumi.String("10.12.118.224"),
    			},
    			LbPrivateIps: pulumi.StringArray{
    				pulumi.String("10.13.72.225/24"),
    			},
    			Flowlog: &nlb.BalancerFlowlogArgs{
    				Action:    pulumi.String("ALL"),
    				Bucket:    pulumi.String("flowlog-bucket"),
    				Direction: pulumi.String("INGRESS"),
    				Name:      pulumi.String("flowlog"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Ionoscloud.Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Ionoscloud.Nlb.Balancer("example", new()
        {
            DatacenterId = exampleIonoscloudDatacenter.Id,
            Name = "nlb with flowlog",
            ListenerLan = example1.Id,
            TargetLan = example2.Id,
            Ips = new[]
            {
                "10.12.118.224",
            },
            LbPrivateIps = new[]
            {
                "10.13.72.225/24",
            },
            Flowlog = new Ionoscloud.Nlb.Inputs.BalancerFlowlogArgs
            {
                Action = "ALL",
                Bucket = "flowlog-bucket",
                Direction = "INGRESS",
                Name = "flowlog",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.nlb.Balancer;
    import com.pulumi.ionoscloud.nlb.BalancerArgs;
    import com.pulumi.ionoscloud.nlb.inputs.BalancerFlowlogArgs;
    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 example = new Balancer("example", BalancerArgs.builder()
                .datacenterId(exampleIonoscloudDatacenter.id())
                .name("nlb with flowlog")
                .listenerLan(example1.id())
                .targetLan(example2.id())
                .ips("10.12.118.224")
                .lbPrivateIps("10.13.72.225/24")
                .flowlog(BalancerFlowlogArgs.builder()
                    .action("ALL")
                    .bucket("flowlog-bucket")
                    .direction("INGRESS")
                    .name("flowlog")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: ionoscloud:nlb:Balancer
        properties:
          datacenterId: ${exampleIonoscloudDatacenter.id}
          name: nlb with flowlog
          listenerLan: ${example1.id}
          targetLan: ${example2.id}
          ips:
            - 10.12.118.224
          lbPrivateIps:
            - 10.13.72.225/24
          flowlog:
            action: ALL
            bucket: flowlog-bucket
            direction: INGRESS
            name: flowlog
    

    This will configure flowlog for ALL(rejected and accepted) ingress traffic and will log it into an existing ionos bucket named flowlog-bucket. Any s3 compatible client can be used to create it. Adding a flowlog does not force re-creation or the nic, but changing any other field than name will. Deleting a flowlog will also force nic re-creation.

    Create Balancer Resource

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

    Constructor syntax

    new Balancer(name: string, args: BalancerArgs, opts?: CustomResourceOptions);
    @overload
    def Balancer(resource_name: str,
                 args: BalancerArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Balancer(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 datacenter_id: Optional[str] = None,
                 listener_lan: Optional[int] = None,
                 target_lan: Optional[int] = None,
                 central_logging: Optional[bool] = None,
                 flowlog: Optional[BalancerFlowlogArgs] = None,
                 ips: Optional[Sequence[str]] = None,
                 lb_private_ips: Optional[Sequence[str]] = None,
                 logging_format: Optional[str] = None,
                 name: Optional[str] = None)
    func NewBalancer(ctx *Context, name string, args BalancerArgs, opts ...ResourceOption) (*Balancer, error)
    public Balancer(string name, BalancerArgs args, CustomResourceOptions? opts = null)
    public Balancer(String name, BalancerArgs args)
    public Balancer(String name, BalancerArgs args, CustomResourceOptions options)
    
    type: ionoscloud:nlb:Balancer
    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 BalancerArgs
    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 BalancerArgs
    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 BalancerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BalancerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BalancerArgs
    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 examplebalancerResourceResourceFromNlbbalancer = new Ionoscloud.Nlb.Balancer("examplebalancerResourceResourceFromNlbbalancer", new()
    {
        DatacenterId = "string",
        ListenerLan = 0,
        TargetLan = 0,
        CentralLogging = false,
        Flowlog = new Ionoscloud.Nlb.Inputs.BalancerFlowlogArgs
        {
            Action = "string",
            Bucket = "string",
            Direction = "string",
            Name = "string",
            Id = "string",
        },
        Ips = new[]
        {
            "string",
        },
        LbPrivateIps = new[]
        {
            "string",
        },
        LoggingFormat = "string",
        Name = "string",
    });
    
    example, err := nlb.NewBalancer(ctx, "examplebalancerResourceResourceFromNlbbalancer", &nlb.BalancerArgs{
    	DatacenterId:   pulumi.String("string"),
    	ListenerLan:    pulumi.Int(0),
    	TargetLan:      pulumi.Int(0),
    	CentralLogging: pulumi.Bool(false),
    	Flowlog: &nlb.BalancerFlowlogArgs{
    		Action:    pulumi.String("string"),
    		Bucket:    pulumi.String("string"),
    		Direction: pulumi.String("string"),
    		Name:      pulumi.String("string"),
    		Id:        pulumi.String("string"),
    	},
    	Ips: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	LbPrivateIps: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	LoggingFormat: pulumi.String("string"),
    	Name:          pulumi.String("string"),
    })
    
    var examplebalancerResourceResourceFromNlbbalancer = new com.ionoscloud.pulumi.ionoscloud.nlb.Balancer("examplebalancerResourceResourceFromNlbbalancer", com.ionoscloud.pulumi.ionoscloud.nlb.BalancerArgs.builder()
        .datacenterId("string")
        .listenerLan(0)
        .targetLan(0)
        .centralLogging(false)
        .flowlog(BalancerFlowlogArgs.builder()
            .action("string")
            .bucket("string")
            .direction("string")
            .name("string")
            .id("string")
            .build())
        .ips("string")
        .lbPrivateIps("string")
        .loggingFormat("string")
        .name("string")
        .build());
    
    examplebalancer_resource_resource_from_nlbbalancer = ionoscloud.nlb.Balancer("examplebalancerResourceResourceFromNlbbalancer",
        datacenter_id="string",
        listener_lan=0,
        target_lan=0,
        central_logging=False,
        flowlog={
            "action": "string",
            "bucket": "string",
            "direction": "string",
            "name": "string",
            "id": "string",
        },
        ips=["string"],
        lb_private_ips=["string"],
        logging_format="string",
        name="string")
    
    const examplebalancerResourceResourceFromNlbbalancer = new ionoscloud.nlb.Balancer("examplebalancerResourceResourceFromNlbbalancer", {
        datacenterId: "string",
        listenerLan: 0,
        targetLan: 0,
        centralLogging: false,
        flowlog: {
            action: "string",
            bucket: "string",
            direction: "string",
            name: "string",
            id: "string",
        },
        ips: ["string"],
        lbPrivateIps: ["string"],
        loggingFormat: "string",
        name: "string",
    });
    
    type: ionoscloud:nlb:Balancer
    properties:
        centralLogging: false
        datacenterId: string
        flowlog:
            action: string
            bucket: string
            direction: string
            id: string
            name: string
        ips:
            - string
        lbPrivateIps:
            - string
        listenerLan: 0
        loggingFormat: string
        name: string
        targetLan: 0
    

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

    DatacenterId string
    [string] A Datacenter's UUID.
    ListenerLan int
    [int] Id of the listening LAN. (inbound)
    TargetLan int
    [int] Id of the balanced private target LAN. (outbound)
    CentralLogging bool
    [bool] Turn logging on and off for this product. Default value is 'false'.
    Flowlog Ionoscloud.BalancerFlowlog
    [list] Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
    Ips List<string>
    [list] Collection of IP addresses of the Network Load Balancer. (inbound and outbound) IP of the listenerLan must be a customer reserved IP for the public load balancer and private IP for the private load balancer.
    LbPrivateIps List<string>
    [list] Collection of private IP addresses with subnet mask of the Network Load Balancer. IPs must contain valid subnet mask. If user will not provide any IP then the system will generate one IP with /24 subnet.
    LoggingFormat string
    Specifies the format of the logs.
    Name string
    [string] A name of that Network Load Balancer.
    DatacenterId string
    [string] A Datacenter's UUID.
    ListenerLan int
    [int] Id of the listening LAN. (inbound)
    TargetLan int
    [int] Id of the balanced private target LAN. (outbound)
    CentralLogging bool
    [bool] Turn logging on and off for this product. Default value is 'false'.
    Flowlog BalancerFlowlogArgs
    [list] Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
    Ips []string
    [list] Collection of IP addresses of the Network Load Balancer. (inbound and outbound) IP of the listenerLan must be a customer reserved IP for the public load balancer and private IP for the private load balancer.
    LbPrivateIps []string
    [list] Collection of private IP addresses with subnet mask of the Network Load Balancer. IPs must contain valid subnet mask. If user will not provide any IP then the system will generate one IP with /24 subnet.
    LoggingFormat string
    Specifies the format of the logs.
    Name string
    [string] A name of that Network Load Balancer.
    datacenterId String
    [string] A Datacenter's UUID.
    listenerLan Integer
    [int] Id of the listening LAN. (inbound)
    targetLan Integer
    [int] Id of the balanced private target LAN. (outbound)
    centralLogging Boolean
    [bool] Turn logging on and off for this product. Default value is 'false'.
    flowlog BalancerFlowlog
    [list] Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
    ips List<String>
    [list] Collection of IP addresses of the Network Load Balancer. (inbound and outbound) IP of the listenerLan must be a customer reserved IP for the public load balancer and private IP for the private load balancer.
    lbPrivateIps List<String>
    [list] Collection of private IP addresses with subnet mask of the Network Load Balancer. IPs must contain valid subnet mask. If user will not provide any IP then the system will generate one IP with /24 subnet.
    loggingFormat String
    Specifies the format of the logs.
    name String
    [string] A name of that Network Load Balancer.
    datacenterId string
    [string] A Datacenter's UUID.
    listenerLan number
    [int] Id of the listening LAN. (inbound)
    targetLan number
    [int] Id of the balanced private target LAN. (outbound)
    centralLogging boolean
    [bool] Turn logging on and off for this product. Default value is 'false'.
    flowlog BalancerFlowlog
    [list] Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
    ips string[]
    [list] Collection of IP addresses of the Network Load Balancer. (inbound and outbound) IP of the listenerLan must be a customer reserved IP for the public load balancer and private IP for the private load balancer.
    lbPrivateIps string[]
    [list] Collection of private IP addresses with subnet mask of the Network Load Balancer. IPs must contain valid subnet mask. If user will not provide any IP then the system will generate one IP with /24 subnet.
    loggingFormat string
    Specifies the format of the logs.
    name string
    [string] A name of that Network Load Balancer.
    datacenter_id str
    [string] A Datacenter's UUID.
    listener_lan int
    [int] Id of the listening LAN. (inbound)
    target_lan int
    [int] Id of the balanced private target LAN. (outbound)
    central_logging bool
    [bool] Turn logging on and off for this product. Default value is 'false'.
    flowlog BalancerFlowlogArgs
    [list] Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
    ips Sequence[str]
    [list] Collection of IP addresses of the Network Load Balancer. (inbound and outbound) IP of the listenerLan must be a customer reserved IP for the public load balancer and private IP for the private load balancer.
    lb_private_ips Sequence[str]
    [list] Collection of private IP addresses with subnet mask of the Network Load Balancer. IPs must contain valid subnet mask. If user will not provide any IP then the system will generate one IP with /24 subnet.
    logging_format str
    Specifies the format of the logs.
    name str
    [string] A name of that Network Load Balancer.
    datacenterId String
    [string] A Datacenter's UUID.
    listenerLan Number
    [int] Id of the listening LAN. (inbound)
    targetLan Number
    [int] Id of the balanced private target LAN. (outbound)
    centralLogging Boolean
    [bool] Turn logging on and off for this product. Default value is 'false'.
    flowlog Property Map
    [list] Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
    ips List<String>
    [list] Collection of IP addresses of the Network Load Balancer. (inbound and outbound) IP of the listenerLan must be a customer reserved IP for the public load balancer and private IP for the private load balancer.
    lbPrivateIps List<String>
    [list] Collection of private IP addresses with subnet mask of the Network Load Balancer. IPs must contain valid subnet mask. If user will not provide any IP then the system will generate one IP with /24 subnet.
    loggingFormat String
    Specifies the format of the logs.
    name String
    [string] A name of that Network Load Balancer.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Balancer Resource

    Get an existing Balancer 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?: BalancerState, opts?: CustomResourceOptions): Balancer
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            central_logging: Optional[bool] = None,
            datacenter_id: Optional[str] = None,
            flowlog: Optional[BalancerFlowlogArgs] = None,
            ips: Optional[Sequence[str]] = None,
            lb_private_ips: Optional[Sequence[str]] = None,
            listener_lan: Optional[int] = None,
            logging_format: Optional[str] = None,
            name: Optional[str] = None,
            target_lan: Optional[int] = None) -> Balancer
    func GetBalancer(ctx *Context, name string, id IDInput, state *BalancerState, opts ...ResourceOption) (*Balancer, error)
    public static Balancer Get(string name, Input<string> id, BalancerState? state, CustomResourceOptions? opts = null)
    public static Balancer get(String name, Output<String> id, BalancerState state, CustomResourceOptions options)
    resources:  _:    type: ionoscloud:nlb:Balancer    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:
    CentralLogging bool
    [bool] Turn logging on and off for this product. Default value is 'false'.
    DatacenterId string
    [string] A Datacenter's UUID.
    Flowlog Ionoscloud.BalancerFlowlog
    [list] Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
    Ips List<string>
    [list] Collection of IP addresses of the Network Load Balancer. (inbound and outbound) IP of the listenerLan must be a customer reserved IP for the public load balancer and private IP for the private load balancer.
    LbPrivateIps List<string>
    [list] Collection of private IP addresses with subnet mask of the Network Load Balancer. IPs must contain valid subnet mask. If user will not provide any IP then the system will generate one IP with /24 subnet.
    ListenerLan int
    [int] Id of the listening LAN. (inbound)
    LoggingFormat string
    Specifies the format of the logs.
    Name string
    [string] A name of that Network Load Balancer.
    TargetLan int
    [int] Id of the balanced private target LAN. (outbound)
    CentralLogging bool
    [bool] Turn logging on and off for this product. Default value is 'false'.
    DatacenterId string
    [string] A Datacenter's UUID.
    Flowlog BalancerFlowlogArgs
    [list] Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
    Ips []string
    [list] Collection of IP addresses of the Network Load Balancer. (inbound and outbound) IP of the listenerLan must be a customer reserved IP for the public load balancer and private IP for the private load balancer.
    LbPrivateIps []string
    [list] Collection of private IP addresses with subnet mask of the Network Load Balancer. IPs must contain valid subnet mask. If user will not provide any IP then the system will generate one IP with /24 subnet.
    ListenerLan int
    [int] Id of the listening LAN. (inbound)
    LoggingFormat string
    Specifies the format of the logs.
    Name string
    [string] A name of that Network Load Balancer.
    TargetLan int
    [int] Id of the balanced private target LAN. (outbound)
    centralLogging Boolean
    [bool] Turn logging on and off for this product. Default value is 'false'.
    datacenterId String
    [string] A Datacenter's UUID.
    flowlog BalancerFlowlog
    [list] Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
    ips List<String>
    [list] Collection of IP addresses of the Network Load Balancer. (inbound and outbound) IP of the listenerLan must be a customer reserved IP for the public load balancer and private IP for the private load balancer.
    lbPrivateIps List<String>
    [list] Collection of private IP addresses with subnet mask of the Network Load Balancer. IPs must contain valid subnet mask. If user will not provide any IP then the system will generate one IP with /24 subnet.
    listenerLan Integer
    [int] Id of the listening LAN. (inbound)
    loggingFormat String
    Specifies the format of the logs.
    name String
    [string] A name of that Network Load Balancer.
    targetLan Integer
    [int] Id of the balanced private target LAN. (outbound)
    centralLogging boolean
    [bool] Turn logging on and off for this product. Default value is 'false'.
    datacenterId string
    [string] A Datacenter's UUID.
    flowlog BalancerFlowlog
    [list] Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
    ips string[]
    [list] Collection of IP addresses of the Network Load Balancer. (inbound and outbound) IP of the listenerLan must be a customer reserved IP for the public load balancer and private IP for the private load balancer.
    lbPrivateIps string[]
    [list] Collection of private IP addresses with subnet mask of the Network Load Balancer. IPs must contain valid subnet mask. If user will not provide any IP then the system will generate one IP with /24 subnet.
    listenerLan number
    [int] Id of the listening LAN. (inbound)
    loggingFormat string
    Specifies the format of the logs.
    name string
    [string] A name of that Network Load Balancer.
    targetLan number
    [int] Id of the balanced private target LAN. (outbound)
    central_logging bool
    [bool] Turn logging on and off for this product. Default value is 'false'.
    datacenter_id str
    [string] A Datacenter's UUID.
    flowlog BalancerFlowlogArgs
    [list] Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
    ips Sequence[str]
    [list] Collection of IP addresses of the Network Load Balancer. (inbound and outbound) IP of the listenerLan must be a customer reserved IP for the public load balancer and private IP for the private load balancer.
    lb_private_ips Sequence[str]
    [list] Collection of private IP addresses with subnet mask of the Network Load Balancer. IPs must contain valid subnet mask. If user will not provide any IP then the system will generate one IP with /24 subnet.
    listener_lan int
    [int] Id of the listening LAN. (inbound)
    logging_format str
    Specifies the format of the logs.
    name str
    [string] A name of that Network Load Balancer.
    target_lan int
    [int] Id of the balanced private target LAN. (outbound)
    centralLogging Boolean
    [bool] Turn logging on and off for this product. Default value is 'false'.
    datacenterId String
    [string] A Datacenter's UUID.
    flowlog Property Map
    [list] Only 1 flow log can be configured. Only the name field can change as part of an update. Flow logs holistically capture network information such as source and destination IP addresses, source and destination ports, number of packets, amount of bytes, the start and end time of the recording, and the type of protocol – and log the extent to which your instances are being accessed.
    ips List<String>
    [list] Collection of IP addresses of the Network Load Balancer. (inbound and outbound) IP of the listenerLan must be a customer reserved IP for the public load balancer and private IP for the private load balancer.
    lbPrivateIps List<String>
    [list] Collection of private IP addresses with subnet mask of the Network Load Balancer. IPs must contain valid subnet mask. If user will not provide any IP then the system will generate one IP with /24 subnet.
    listenerLan Number
    [int] Id of the listening LAN. (inbound)
    loggingFormat String
    Specifies the format of the logs.
    name String
    [string] A name of that Network Load Balancer.
    targetLan Number
    [int] Id of the balanced private target LAN. (outbound)

    Supporting Types

    BalancerFlowlog, BalancerFlowlogArgs

    Action string
    [string] Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, forces re-creation.
    Bucket string
    [string] Specifies the IONOS Object Storage bucket where the flow log data will be stored. The bucket must exist. Immutable, forces re-creation.
    Direction string
    [string] Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, forces re-creation.
    Name string

    [string] Specifies the name of the flow log.

    ⚠️ Note:: Removing the flowlog forces re-creation of the network load balancer resource.

    Id string
    The resource's unique identifier.
    Action string
    [string] Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, forces re-creation.
    Bucket string
    [string] Specifies the IONOS Object Storage bucket where the flow log data will be stored. The bucket must exist. Immutable, forces re-creation.
    Direction string
    [string] Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, forces re-creation.
    Name string

    [string] Specifies the name of the flow log.

    ⚠️ Note:: Removing the flowlog forces re-creation of the network load balancer resource.

    Id string
    The resource's unique identifier.
    action String
    [string] Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, forces re-creation.
    bucket String
    [string] Specifies the IONOS Object Storage bucket where the flow log data will be stored. The bucket must exist. Immutable, forces re-creation.
    direction String
    [string] Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, forces re-creation.
    name String

    [string] Specifies the name of the flow log.

    ⚠️ Note:: Removing the flowlog forces re-creation of the network load balancer resource.

    id String
    The resource's unique identifier.
    action string
    [string] Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, forces re-creation.
    bucket string
    [string] Specifies the IONOS Object Storage bucket where the flow log data will be stored. The bucket must exist. Immutable, forces re-creation.
    direction string
    [string] Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, forces re-creation.
    name string

    [string] Specifies the name of the flow log.

    ⚠️ Note:: Removing the flowlog forces re-creation of the network load balancer resource.

    id string
    The resource's unique identifier.
    action str
    [string] Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, forces re-creation.
    bucket str
    [string] Specifies the IONOS Object Storage bucket where the flow log data will be stored. The bucket must exist. Immutable, forces re-creation.
    direction str
    [string] Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, forces re-creation.
    name str

    [string] Specifies the name of the flow log.

    ⚠️ Note:: Removing the flowlog forces re-creation of the network load balancer resource.

    id str
    The resource's unique identifier.
    action String
    [string] Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, forces re-creation.
    bucket String
    [string] Specifies the IONOS Object Storage bucket where the flow log data will be stored. The bucket must exist. Immutable, forces re-creation.
    direction String
    [string] Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, forces re-creation.
    name String

    [string] Specifies the name of the flow log.

    ⚠️ Note:: Removing the flowlog forces re-creation of the network load balancer resource.

    id String
    The resource's unique identifier.

    Import

    A Network Load Balancer resource can be imported using its resource id and the datacenter id e.g.

    $ pulumi import ionoscloud:nlb/balancer:Balancer my_networkloadbalancer datacenter uuid/networkloadbalancer uuid
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    ionoscloud ionos-cloud/pulumi-ionoscloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ionoscloud Terraform Provider.
    ionoscloud logo
    IonosCloud v0.2.2 published on Monday, May 12, 2025 by ionos-cloud