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",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.get_networkloadbalancer(datacenter_id=ionoscloud_datacenter["example"]["id"],
id="networkloadbalancer_id")
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
})
}
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",
});
});
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());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:getNetworkloadbalancer
arguments:
datacenterId: ${ionoscloud_datacenter.example.id}
id: networkloadbalancer_id
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",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.get_networkloadbalancer(datacenter_id=ionoscloud_datacenter["example"]["id"],
name="Network Load Balancer Name")
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
})
}
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",
});
});
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());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:getNetworkloadbalancer
arguments:
datacenterId: ${ionoscloud_datacenter.example.id}
name: Network Load Balancer Name
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>
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]
func LookupNetworkloadbalancer(ctx *Context, args *LookupNetworkloadbalancerArgs, opts ...InvokeOption) (*LookupNetworkloadbalancerResult, error)
func LookupNetworkloadbalancerOutput(ctx *Context, args *LookupNetworkloadbalancerOutputArgs, opts ...InvokeOption) LookupNetworkloadbalancerResultOutput
> 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)
}
public static CompletableFuture<GetNetworkloadbalancerResult> getNetworkloadbalancer(GetNetworkloadbalancerArgs args, InvokeOptions options)
public static Output<GetNetworkloadbalancerResult> getNetworkloadbalancer(GetNetworkloadbalancerArgs args, InvokeOptions options)
fn::invoke:
function: ionoscloud:index/getNetworkloadbalancer:getNetworkloadbalancer
arguments:
# arguments dictionary
The following arguments are supported:
- Datacenter
Id string - Datacenter's UUID.
- Id string
ID of the network load balancer you want to search for.
datacenter_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- Name string
- Name of an existing network load balancer that you want to search for.
- Timeouts
Get
Networkloadbalancer Timeouts
- Datacenter
Id string - Datacenter's UUID.
- Id string
ID of the network load balancer you want to search for.
datacenter_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- Name string
- Name of an existing network load balancer that you want to search for.
- Timeouts
Get
Networkloadbalancer Timeouts
- datacenter
Id String - Datacenter's UUID.
- id String
ID of the network load balancer you want to search for.
datacenter_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- name String
- Name of an existing network load balancer that you want to search for.
- timeouts
Get
Networkloadbalancer Timeouts
- datacenter
Id string - Datacenter's UUID.
- id string
ID of the network load balancer you want to search for.
datacenter_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- name string
- Name of an existing network load balancer that you want to search for.
- timeouts
Get
Networkloadbalancer Timeouts
- datacenter_
id str - Datacenter's UUID.
- id str
ID of the network load balancer you want to search for.
datacenter_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- name str
- Name of an existing network load balancer that you want to search for.
- timeouts
Get
Networkloadbalancer Timeouts
- datacenter
Id String - Datacenter's UUID.
- id String
ID of the network load balancer you want to search for.
datacenter_id
and eithername
orid
must be provided. If none, or both ofname
andid
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:
- Central
Logging bool - Turn logging on and off for this product. Default value is 'false'.
- Datacenter
Id string - Flowlogs
List<Get
Networkloadbalancer Flowlog> - 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.
- Lb
Private List<string>Ips - 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 double - Id of the listening LAN. (inbound)
- Logging
Format string - Name string
- Specifies the name of the flow log.
- Target
Lan double - Id of the balanced private target LAN. (outbound)
- Timeouts
Get
Networkloadbalancer Timeouts
- Central
Logging bool - Turn logging on and off for this product. Default value is 'false'.
- Datacenter
Id string - Flowlogs
[]Get
Networkloadbalancer Flowlog - 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.
- Lb
Private []stringIps - 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 float64 - Id of the listening LAN. (inbound)
- Logging
Format string - Name string
- Specifies the name of the flow log.
- Target
Lan float64 - Id of the balanced private target LAN. (outbound)
- Timeouts
Get
Networkloadbalancer Timeouts
- central
Logging Boolean - Turn logging on and off for this product. Default value is 'false'.
- datacenter
Id String - flowlogs
List<Get
Networkloadbalancer Flowlog> - 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.
- lb
Private List<String>Ips - 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 Double - Id of the listening LAN. (inbound)
- logging
Format String - name String
- Specifies the name of the flow log.
- target
Lan Double - Id of the balanced private target LAN. (outbound)
- timeouts
Get
Networkloadbalancer Timeouts
- central
Logging boolean - Turn logging on and off for this product. Default value is 'false'.
- datacenter
Id string - flowlogs
Get
Networkloadbalancer Flowlog[] - 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.
- lb
Private string[]Ips - 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 number - Id of the listening LAN. (inbound)
- logging
Format string - name string
- Specifies the name of the flow log.
- target
Lan number - Id of the balanced private target LAN. (outbound)
- timeouts
Get
Networkloadbalancer Timeouts
- central_
logging bool - Turn logging on and off for this product. Default value is 'false'.
- datacenter_
id str - flowlogs
Sequence[Get
Networkloadbalancer Flowlog] - 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_ Sequence[str]ips - 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
Get
Networkloadbalancer Timeouts
- central
Logging Boolean - Turn logging on and off for this product. Default value is 'false'.
- datacenter
Id 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.
- lb
Private List<String>Ips - 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 Number - Id of the listening LAN. (inbound)
- logging
Format String - name String
- Specifies the name of the flow log.
- target
Lan Number - Id of the balanced private target LAN. (outbound)
- timeouts Property Map
Supporting Types
GetNetworkloadbalancerFlowlog
- Action string
- Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, forces re-creation.
- Bucket 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
- Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, forces re-creation.
- Id string
ID of the network load balancer you want to search for.
datacenter_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- Name string
- Name of an existing network load balancer that you want to search for.
- Action string
- Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, forces re-creation.
- Bucket 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
- Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, forces re-creation.
- Id string
ID of the network load balancer you want to search for.
datacenter_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- Name string
- Name of an existing network load balancer that you want to search for.
- action String
- Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, forces re-creation.
- bucket 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
- Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, forces re-creation.
- id String
ID of the network load balancer you want to search for.
datacenter_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- name String
- Name of an existing network load balancer that you want to search for.
- action string
- Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, forces re-creation.
- bucket 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
- Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, forces re-creation.
- id string
ID of the network load balancer you want to search for.
datacenter_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- name string
- Name of an existing network load balancer that you want to search for.
- action str
- Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, forces re-creation.
- bucket str
- Specifies the IONOS Object Storage bucket where the flow log data will be stored. The bucket must exist. Immutable, forces re-creation.
- direction str
- Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, forces re-creation.
- id str
ID of the network load balancer you want to search for.
datacenter_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- name str
- Name of an existing network load balancer that you want to search for.
- action String
- Specifies the action to be taken when the rule is matched. Possible values: ACCEPTED, REJECTED, ALL. Immutable, forces re-creation.
- bucket 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
- Specifies the traffic direction pattern. Valid values: INGRESS, EGRESS, BIDIRECTIONAL. Immutable, forces re-creation.
- id String
ID of the network load balancer you want to search for.
datacenter_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- name String
- Name of an existing network load balancer that you want to search for.
GetNetworkloadbalancerTimeouts
Package Details
- Repository
- ionoscloud ionos-cloud/terraform-provider-ionoscloud
- License
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.