1. Packages
  2. Scaleway
  3. API Docs
  4. getLbBackend
Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse

scaleway.getLbBackend

Explore with Pulumi AI

Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse
Deprecated: scaleway.index/getlbbackend.getLbBackend has been deprecated in favor of scaleway.loadbalancers/getbackend.getBackend

Get information about Scaleway Load Balancer backends.

For more information, see the main documentation or API documentation.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";
import * as scaleway from "@pulumiverse/scaleway";

const main = new scaleway.loadbalancers.Ip("main", {});
const mainLoadBalancer = new scaleway.loadbalancers.LoadBalancer("main", {
    ipId: main.id,
    name: "data-test-lb-backend",
    type: "LB-S",
});
const mainBackend = new scaleway.loadbalancers.Backend("main", {
    lbId: mainLoadBalancer.id,
    name: "backend01",
    forwardProtocol: "http",
    forwardPort: 80,
});
const byID = scaleway.loadbalancers.getBackendOutput({
    backendId: mainBackend.id,
});
const byName = scaleway.loadbalancers.getBackendOutput({
    name: mainBackend.name,
    lbId: mainLoadBalancer.id,
});
Copy
import pulumi
import pulumi_scaleway as scaleway
import pulumiverse_scaleway as scaleway

main = scaleway.loadbalancers.Ip("main")
main_load_balancer = scaleway.loadbalancers.LoadBalancer("main",
    ip_id=main.id,
    name="data-test-lb-backend",
    type="LB-S")
main_backend = scaleway.loadbalancers.Backend("main",
    lb_id=main_load_balancer.id,
    name="backend01",
    forward_protocol="http",
    forward_port=80)
by_id = scaleway.loadbalancers.get_backend_output(backend_id=main_backend.id)
by_name = scaleway.loadbalancers.get_backend_output(name=main_backend.name,
    lb_id=main_load_balancer.id)
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/loadbalancers"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		main, err := loadbalancers.NewIp(ctx, "main", nil)
		if err != nil {
			return err
		}
		mainLoadBalancer, err := loadbalancers.NewLoadBalancer(ctx, "main", &loadbalancers.LoadBalancerArgs{
			IpId: main.ID(),
			Name: pulumi.String("data-test-lb-backend"),
			Type: pulumi.String("LB-S"),
		})
		if err != nil {
			return err
		}
		mainBackend, err := loadbalancers.NewBackend(ctx, "main", &loadbalancers.BackendArgs{
			LbId:            mainLoadBalancer.ID(),
			Name:            pulumi.String("backend01"),
			ForwardProtocol: pulumi.String("http"),
			ForwardPort:     pulumi.Int(80),
		})
		if err != nil {
			return err
		}
		_ = loadbalancers.LookupBackendOutput(ctx, loadbalancers.GetBackendOutputArgs{
			BackendId: mainBackend.ID(),
		}, nil)
		_ = loadbalancers.LookupBackendOutput(ctx, loadbalancers.GetBackendOutputArgs{
			Name: mainBackend.Name,
			LbId: mainLoadBalancer.ID(),
		}, nil)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var main = new Scaleway.Loadbalancers.Ip("main");

    var mainLoadBalancer = new Scaleway.Loadbalancers.LoadBalancer("main", new()
    {
        IpId = main.Id,
        Name = "data-test-lb-backend",
        Type = "LB-S",
    });

    var mainBackend = new Scaleway.Loadbalancers.Backend("main", new()
    {
        LbId = mainLoadBalancer.Id,
        Name = "backend01",
        ForwardProtocol = "http",
        ForwardPort = 80,
    });

    var byID = Scaleway.Loadbalancers.GetBackend.Invoke(new()
    {
        BackendId = mainBackend.Id,
    });

    var byName = Scaleway.Loadbalancers.GetBackend.Invoke(new()
    {
        Name = mainBackend.Name,
        LbId = mainLoadBalancer.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.loadbalancers.Ip;
import com.pulumi.scaleway.loadbalancers.LoadBalancer;
import com.pulumi.scaleway.loadbalancers.LoadBalancerArgs;
import com.pulumi.scaleway.loadbalancers.Backend;
import com.pulumi.scaleway.loadbalancers.BackendArgs;
import com.pulumi.scaleway.loadbalancers.LoadbalancersFunctions;
import com.pulumi.scaleway.loadbalancers.inputs.GetBackendArgs;
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 main = new Ip("main");

        var mainLoadBalancer = new LoadBalancer("mainLoadBalancer", LoadBalancerArgs.builder()
            .ipId(main.id())
            .name("data-test-lb-backend")
            .type("LB-S")
            .build());

        var mainBackend = new Backend("mainBackend", BackendArgs.builder()
            .lbId(mainLoadBalancer.id())
            .name("backend01")
            .forwardProtocol("http")
            .forwardPort("80")
            .build());

        final var byID = LoadbalancersFunctions.getBackend(GetBackendArgs.builder()
            .backendId(mainBackend.id())
            .build());

        final var byName = LoadbalancersFunctions.getBackend(GetBackendArgs.builder()
            .name(mainBackend.name())
            .lbId(mainLoadBalancer.id())
            .build());

    }
}
Copy
resources:
  main:
    type: scaleway:loadbalancers:Ip
  mainLoadBalancer:
    type: scaleway:loadbalancers:LoadBalancer
    name: main
    properties:
      ipId: ${main.id}
      name: data-test-lb-backend
      type: LB-S
  mainBackend:
    type: scaleway:loadbalancers:Backend
    name: main
    properties:
      lbId: ${mainLoadBalancer.id}
      name: backend01
      forwardProtocol: http
      forwardPort: '80'
variables:
  byID:
    fn::invoke:
      function: scaleway:loadbalancers:getBackend
      arguments:
        backendId: ${mainBackend.id}
  byName:
    fn::invoke:
      function: scaleway:loadbalancers:getBackend
      arguments:
        name: ${mainBackend.name}
        lbId: ${mainLoadBalancer.id}
Copy

Using getLbBackend

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 getLbBackend(args: GetLbBackendArgs, opts?: InvokeOptions): Promise<GetLbBackendResult>
function getLbBackendOutput(args: GetLbBackendOutputArgs, opts?: InvokeOptions): Output<GetLbBackendResult>
Copy
def get_lb_backend(backend_id: Optional[str] = None,
                   lb_id: Optional[str] = None,
                   name: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetLbBackendResult
def get_lb_backend_output(backend_id: Optional[pulumi.Input[str]] = None,
                   lb_id: Optional[pulumi.Input[str]] = None,
                   name: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetLbBackendResult]
Copy
func GetLbBackend(ctx *Context, args *GetLbBackendArgs, opts ...InvokeOption) (*GetLbBackendResult, error)
func GetLbBackendOutput(ctx *Context, args *GetLbBackendOutputArgs, opts ...InvokeOption) GetLbBackendResultOutput
Copy

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

public static class GetLbBackend 
{
    public static Task<GetLbBackendResult> InvokeAsync(GetLbBackendArgs args, InvokeOptions? opts = null)
    public static Output<GetLbBackendResult> Invoke(GetLbBackendInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetLbBackendResult> getLbBackend(GetLbBackendArgs args, InvokeOptions options)
public static Output<GetLbBackendResult> getLbBackend(GetLbBackendArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: scaleway:index/getLbBackend:getLbBackend
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

BackendId string
The backend ID.

  • Only one of name and backend_id should be specified.
LbId string
Load Balancer ID this backend is attached to.
Name string
The name of the backend.

  • When using name you should specify the lb-id
BackendId string
The backend ID.

  • Only one of name and backend_id should be specified.
LbId string
Load Balancer ID this backend is attached to.
Name string
The name of the backend.

  • When using name you should specify the lb-id
backendId String
The backend ID.

  • Only one of name and backend_id should be specified.
lbId String
Load Balancer ID this backend is attached to.
name String
The name of the backend.

  • When using name you should specify the lb-id
backendId string
The backend ID.

  • Only one of name and backend_id should be specified.
lbId string
Load Balancer ID this backend is attached to.
name string
The name of the backend.

  • When using name you should specify the lb-id
backend_id str
The backend ID.

  • Only one of name and backend_id should be specified.
lb_id str
Load Balancer ID this backend is attached to.
name str
The name of the backend.

  • When using name you should specify the lb-id
backendId String
The backend ID.

  • Only one of name and backend_id should be specified.
lbId String
Load Balancer ID this backend is attached to.
name String
The name of the backend.

  • When using name you should specify the lb-id

getLbBackend Result

The following output properties are available:

FailoverHost string
ForwardPort int
ForwardPortAlgorithm string
ForwardProtocol string
HealthCheckDelay string
HealthCheckHttp List<Pulumiverse.Scaleway.Outputs.GetLbBackendHealthCheckHttp>
HealthCheckHttps List<Pulumiverse.Scaleway.Outputs.GetLbBackendHealthCheckHttp>
HealthCheckMaxRetries int
HealthCheckPort int
HealthCheckSendProxy bool
HealthCheckTcps List<Pulumiverse.Scaleway.Outputs.GetLbBackendHealthCheckTcp>
HealthCheckTimeout string
HealthCheckTransientDelay string
Id string
The provider-assigned unique ID for this managed resource.
IgnoreSslServerVerify bool
MaxConnections int
MaxRetries int
OnMarkedDownAction string
ProxyProtocol string
RedispatchAttemptCount int
SendProxyV2 bool
ServerIps List<string>
SslBridging bool
StickySessions string
StickySessionsCookieName string
TimeoutConnect string
TimeoutQueue string
TimeoutServer string
TimeoutTunnel string
BackendId string
LbId string
Name string
failoverHost String
forwardPort Integer
forwardPortAlgorithm String
forwardProtocol String
healthCheckDelay String
healthCheckHttp List<GetLbBackendHealthCheckHttp>
healthCheckHttps List<GetLbBackendHealthCheckHttp>
healthCheckMaxRetries Integer
healthCheckPort Integer
healthCheckSendProxy Boolean
healthCheckTcps List<GetLbBackendHealthCheckTcp>
healthCheckTimeout String
healthCheckTransientDelay String
id String
The provider-assigned unique ID for this managed resource.
ignoreSslServerVerify Boolean
maxConnections Integer
maxRetries Integer
onMarkedDownAction String
proxyProtocol String
redispatchAttemptCount Integer
sendProxyV2 Boolean
serverIps List<String>
sslBridging Boolean
stickySessions String
stickySessionsCookieName String
timeoutConnect String
timeoutQueue String
timeoutServer String
timeoutTunnel String
backendId String
lbId String
name String
failover_host str
forward_port int
forward_port_algorithm str
forward_protocol str
health_check_delay str
health_check_http Sequence[GetLbBackendHealthCheckHttp]
health_check_https Sequence[GetLbBackendHealthCheckHttp]
health_check_max_retries int
health_check_port int
health_check_send_proxy bool
health_check_tcps Sequence[GetLbBackendHealthCheckTcp]
health_check_timeout str
health_check_transient_delay str
id str
The provider-assigned unique ID for this managed resource.
ignore_ssl_server_verify bool
max_connections int
max_retries int
on_marked_down_action str
proxy_protocol str
redispatch_attempt_count int
send_proxy_v2 bool
server_ips Sequence[str]
ssl_bridging bool
sticky_sessions str
sticky_sessions_cookie_name str
timeout_connect str
timeout_queue str
timeout_server str
timeout_tunnel str
backend_id str
lb_id str
name str

Supporting Types

GetLbBackendHealthCheckHttp

Code This property is required. int
The expected HTTP status code
HostHeader This property is required. string
The HTTP host header to use for HC requests
Method This property is required. string
The HTTP method to use for HC requests
Sni This property is required. string
The SNI to use for HC requests over SSL
Uri This property is required. string
The HTTPS endpoint URL to call for HC requests
Code This property is required. int
The expected HTTP status code
HostHeader This property is required. string
The HTTP host header to use for HC requests
Method This property is required. string
The HTTP method to use for HC requests
Sni This property is required. string
The SNI to use for HC requests over SSL
Uri This property is required. string
The HTTPS endpoint URL to call for HC requests
code This property is required. Integer
The expected HTTP status code
hostHeader This property is required. String
The HTTP host header to use for HC requests
method This property is required. String
The HTTP method to use for HC requests
sni This property is required. String
The SNI to use for HC requests over SSL
uri This property is required. String
The HTTPS endpoint URL to call for HC requests
code This property is required. number
The expected HTTP status code
hostHeader This property is required. string
The HTTP host header to use for HC requests
method This property is required. string
The HTTP method to use for HC requests
sni This property is required. string
The SNI to use for HC requests over SSL
uri This property is required. string
The HTTPS endpoint URL to call for HC requests
code This property is required. int
The expected HTTP status code
host_header This property is required. str
The HTTP host header to use for HC requests
method This property is required. str
The HTTP method to use for HC requests
sni This property is required. str
The SNI to use for HC requests over SSL
uri This property is required. str
The HTTPS endpoint URL to call for HC requests
code This property is required. Number
The expected HTTP status code
hostHeader This property is required. String
The HTTP host header to use for HC requests
method This property is required. String
The HTTP method to use for HC requests
sni This property is required. String
The SNI to use for HC requests over SSL
uri This property is required. String
The HTTPS endpoint URL to call for HC requests

Package Details

Repository
scaleway pulumiverse/pulumi-scaleway
License
Apache-2.0
Notes
This Pulumi package is based on the scaleway Terraform Provider.
Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse