1. Packages
  2. Ionoscloud Provider
  3. API Docs
  4. getNetworkloadbalancer
ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud

ionoscloud.getNetworkloadbalancer

Explore with Pulumi AI

The Network Load Balancer data source can be used to search for and return existing network load balancers. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search string so that it is specific enough to return only one result.

Example Usage

By ID

import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";

const example = ionoscloud.getNetworkloadbalancer({
    datacenterId: ionoscloud_datacenter.example.id,
    id: "networkloadbalancer_id",
});
Copy
import pulumi
import pulumi_ionoscloud as ionoscloud

example = ionoscloud.get_networkloadbalancer(datacenter_id=ionoscloud_datacenter["example"]["id"],
    id="networkloadbalancer_id")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ionoscloud.LookupNetworkloadbalancer(ctx, &ionoscloud.LookupNetworkloadbalancerArgs{
			DatacenterId: ionoscloud_datacenter.Example.Id,
			Id:           pulumi.StringRef("networkloadbalancer_id"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;

return await Deployment.RunAsync(() => 
{
    var example = Ionoscloud.GetNetworkloadbalancer.Invoke(new()
    {
        DatacenterId = ionoscloud_datacenter.Example.Id,
        Id = "networkloadbalancer_id",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.IonoscloudFunctions;
import com.pulumi.ionoscloud.inputs.GetNetworkloadbalancerArgs;
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) {
        final var example = IonoscloudFunctions.getNetworkloadbalancer(GetNetworkloadbalancerArgs.builder()
            .datacenterId(ionoscloud_datacenter.example().id())
            .id("networkloadbalancer_id")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: ionoscloud:getNetworkloadbalancer
      arguments:
        datacenterId: ${ionoscloud_datacenter.example.id}
        id: networkloadbalancer_id
Copy

By Name

import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";

const example = ionoscloud.getNetworkloadbalancer({
    datacenterId: ionoscloud_datacenter.example.id,
    name: "Network Load Balancer Name",
});
Copy
import pulumi
import pulumi_ionoscloud as ionoscloud

example = ionoscloud.get_networkloadbalancer(datacenter_id=ionoscloud_datacenter["example"]["id"],
    name="Network Load Balancer Name")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ionoscloud.LookupNetworkloadbalancer(ctx, &ionoscloud.LookupNetworkloadbalancerArgs{
			DatacenterId: ionoscloud_datacenter.Example.Id,
			Name:         pulumi.StringRef("Network Load Balancer Name"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;

return await Deployment.RunAsync(() => 
{
    var example = Ionoscloud.GetNetworkloadbalancer.Invoke(new()
    {
        DatacenterId = ionoscloud_datacenter.Example.Id,
        Name = "Network Load Balancer Name",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.IonoscloudFunctions;
import com.pulumi.ionoscloud.inputs.GetNetworkloadbalancerArgs;
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) {
        final var example = IonoscloudFunctions.getNetworkloadbalancer(GetNetworkloadbalancerArgs.builder()
            .datacenterId(ionoscloud_datacenter.example().id())
            .name("Network Load Balancer Name")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: ionoscloud:getNetworkloadbalancer
      arguments:
        datacenterId: ${ionoscloud_datacenter.example.id}
        name: Network Load Balancer Name
Copy

Using getNetworkloadbalancer

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getNetworkloadbalancer(args: GetNetworkloadbalancerArgs, opts?: InvokeOptions): Promise<GetNetworkloadbalancerResult>
function getNetworkloadbalancerOutput(args: GetNetworkloadbalancerOutputArgs, opts?: InvokeOptions): Output<GetNetworkloadbalancerResult>
Copy
def get_networkloadbalancer(datacenter_id: Optional[str] = None,
                            id: Optional[str] = None,
                            name: Optional[str] = None,
                            timeouts: Optional[GetNetworkloadbalancerTimeouts] = None,
                            opts: Optional[InvokeOptions] = None) -> GetNetworkloadbalancerResult
def get_networkloadbalancer_output(datacenter_id: Optional[pulumi.Input[str]] = None,
                            id: Optional[pulumi.Input[str]] = None,
                            name: Optional[pulumi.Input[str]] = None,
                            timeouts: Optional[pulumi.Input[GetNetworkloadbalancerTimeoutsArgs]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetNetworkloadbalancerResult]
Copy
func LookupNetworkloadbalancer(ctx *Context, args *LookupNetworkloadbalancerArgs, opts ...InvokeOption) (*LookupNetworkloadbalancerResult, error)
func LookupNetworkloadbalancerOutput(ctx *Context, args *LookupNetworkloadbalancerOutputArgs, opts ...InvokeOption) LookupNetworkloadbalancerResultOutput
Copy

> Note: This function is named LookupNetworkloadbalancer in the Go SDK.

public static class GetNetworkloadbalancer 
{
    public static Task<GetNetworkloadbalancerResult> InvokeAsync(GetNetworkloadbalancerArgs args, InvokeOptions? opts = null)
    public static Output<GetNetworkloadbalancerResult> Invoke(GetNetworkloadbalancerInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetNetworkloadbalancerResult> getNetworkloadbalancer(GetNetworkloadbalancerArgs args, InvokeOptions options)
public static Output<GetNetworkloadbalancerResult> getNetworkloadbalancer(GetNetworkloadbalancerArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: ionoscloud:index/getNetworkloadbalancer:getNetworkloadbalancer
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

DatacenterId This property is required. string
Datacenter's UUID.
Id string

ID of the network load balancer you want to search for.

datacenter_id and either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

Name string
Name of an existing network load balancer that you want to search for.
Timeouts GetNetworkloadbalancerTimeouts
DatacenterId This property is required. string
Datacenter's UUID.
Id string

ID of the network load balancer you want to search for.

datacenter_id and either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

Name string
Name of an existing network load balancer that you want to search for.
Timeouts GetNetworkloadbalancerTimeouts
datacenterId This property is required. String
Datacenter's UUID.
id String

ID of the network load balancer you want to search for.

datacenter_id and either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

name String
Name of an existing network load balancer that you want to search for.
timeouts GetNetworkloadbalancerTimeouts
datacenterId This property is required. string
Datacenter's UUID.
id string

ID of the network load balancer you want to search for.

datacenter_id and either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

name string
Name of an existing network load balancer that you want to search for.
timeouts GetNetworkloadbalancerTimeouts
datacenter_id This property is required. str
Datacenter's UUID.
id str

ID of the network load balancer you want to search for.

datacenter_id and either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

name str
Name of an existing network load balancer that you want to search for.
timeouts GetNetworkloadbalancerTimeouts
datacenterId This property is required. String
Datacenter's UUID.
id String

ID of the network load balancer you want to search for.

datacenter_id and either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

name String
Name of an existing network load balancer that you want to search for.
timeouts Property Map

getNetworkloadbalancer Result

The following output properties are available:

CentralLogging bool
Turn logging on and off for this product. Default value is 'false'.
DatacenterId string
Flowlogs List<GetNetworkloadbalancerFlowlog>
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.
Id string
Id of that Network Load Balancer
Ips List<string>
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>
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 double
Id of the listening LAN. (inbound)
LoggingFormat string
Name string
Specifies the name of the flow log.
TargetLan double
Id of the balanced private target LAN. (outbound)
Timeouts GetNetworkloadbalancerTimeouts
CentralLogging bool
Turn logging on and off for this product. Default value is 'false'.
DatacenterId string
Flowlogs []GetNetworkloadbalancerFlowlog
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.
Id string
Id of that Network Load Balancer
Ips []string
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
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 float64
Id of the listening LAN. (inbound)
LoggingFormat string
Name string
Specifies the name of the flow log.
TargetLan float64
Id of the balanced private target LAN. (outbound)
Timeouts GetNetworkloadbalancerTimeouts
centralLogging Boolean
Turn logging on and off for this product. Default value is 'false'.
datacenterId String
flowlogs List<GetNetworkloadbalancerFlowlog>
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.
id String
Id of that Network Load Balancer
ips List<String>
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>
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 Double
Id of the listening LAN. (inbound)
loggingFormat String
name String
Specifies the name of the flow log.
targetLan Double
Id of the balanced private target LAN. (outbound)
timeouts GetNetworkloadbalancerTimeouts
centralLogging boolean
Turn logging on and off for this product. Default value is 'false'.
datacenterId string
flowlogs GetNetworkloadbalancerFlowlog[]
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.
id string
Id of that Network Load Balancer
ips string[]
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[]
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
Id of the listening LAN. (inbound)
loggingFormat string
name string
Specifies the name of the flow log.
targetLan number
Id of the balanced private target LAN. (outbound)
timeouts GetNetworkloadbalancerTimeouts
central_logging bool
Turn logging on and off for this product. Default value is 'false'.
datacenter_id str
flowlogs Sequence[GetNetworkloadbalancerFlowlog]
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.
id str
Id of that Network Load Balancer
ips Sequence[str]
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]
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 float
Id of the listening LAN. (inbound)
logging_format str
name str
Specifies the name of the flow log.
target_lan float
Id of the balanced private target LAN. (outbound)
timeouts GetNetworkloadbalancerTimeouts
centralLogging Boolean
Turn logging on and off for this product. Default value is 'false'.
datacenterId String
flowlogs List<Property Map>
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.
id String
Id of that Network Load Balancer
ips List<String>
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>
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
Id of the listening LAN. (inbound)
loggingFormat String
name String
Specifies the name of the flow log.
targetLan Number
Id of the balanced private target LAN. (outbound)
timeouts Property Map

Supporting Types

GetNetworkloadbalancerFlowlog

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

ID of the network load balancer you want to search for.

datacenter_id and either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

Name This property is required. string
Name of an existing network load balancer that you want to search for.
Action This property is required. string
Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, forces re-creation.
Bucket This property is required. string
Specifies the IONOS Object Storage bucket where the flow log data will be stored. The bucket must exist. Immutable, forces re-creation.
Direction This property is required. string
Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, forces re-creation.
Id This property is required. string

ID of the network load balancer you want to search for.

datacenter_id and either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

Name This property is required. string
Name of an existing network load balancer that you want to search for.
action This property is required. String
Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, forces re-creation.
bucket This property is required. String
Specifies the IONOS Object Storage bucket where the flow log data will be stored. The bucket must exist. Immutable, forces re-creation.
direction This property is required. String
Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, forces re-creation.
id This property is required. String

ID of the network load balancer you want to search for.

datacenter_id and either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

name This property is required. String
Name of an existing network load balancer that you want to search for.
action This property is required. string
Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, forces re-creation.
bucket This property is required. string
Specifies the IONOS Object Storage bucket where the flow log data will be stored. The bucket must exist. Immutable, forces re-creation.
direction This property is required. string
Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, forces re-creation.
id This property is required. string

ID of the network load balancer you want to search for.

datacenter_id and either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

name This property is required. string
Name of an existing network load balancer that you want to search for.
action This property is required. str
Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, forces re-creation.
bucket This property is required. str
Specifies the IONOS Object Storage bucket where the flow log data will be stored. The bucket must exist. Immutable, forces re-creation.
direction This property is required. str
Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, forces re-creation.
id This property is required. str

ID of the network load balancer you want to search for.

datacenter_id and either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

name This property is required. str
Name of an existing network load balancer that you want to search for.
action This property is required. String
Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, forces re-creation.
bucket This property is required. String
Specifies the IONOS Object Storage bucket where the flow log data will be stored. The bucket must exist. Immutable, forces re-creation.
direction This property is required. String
Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, forces re-creation.
id This property is required. String

ID of the network load balancer you want to search for.

datacenter_id and either name or id must be provided. If none, or both of name and id are provided, the datasource will return an error.

name This property is required. String
Name of an existing network load balancer that you want to search for.

GetNetworkloadbalancerTimeouts

Create string
Default string
Delete string
Update string
Create string
Default string
Delete string
Update string
create String
default_ String
delete String
update String
create string
default string
delete string
update string
create String
default String
delete String
update String

Package Details

Repository
ionoscloud ionos-cloud/terraform-provider-ionoscloud
License
Notes
This Pulumi package is based on the ionoscloud Terraform Provider.