1. Packages
  2. Gcore Provider
  3. API Docs
  4. getLbpool
gcore 0.19.0 published on Monday, Apr 14, 2025 by g-core

gcore.getLbpool

Explore with Pulumi AI

gcore 0.19.0 published on Monday, Apr 14, 2025 by g-core

Example Usage

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

const project = gcore.getProject({
    name: "Default",
});
const region = gcore.getRegion({
    name: "Luxembourg-2",
});
const pool = Promise.all([region, project]).then(([region, project]) => gcore.getLbpool({
    regionId: region.id,
    projectId: project.id,
    name: "test-pool",
}));
export const view = pool;
Copy
import pulumi
import pulumi_gcore as gcore

project = gcore.get_project(name="Default")
region = gcore.get_region(name="Luxembourg-2")
pool = gcore.get_lbpool(region_id=region.id,
    project_id=project.id,
    name="test-pool")
pulumi.export("view", pool)
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		project, err := gcore.GetProject(ctx, &gcore.GetProjectArgs{
			Name: "Default",
		}, nil)
		if err != nil {
			return err
		}
		region, err := gcore.GetRegion(ctx, &gcore.GetRegionArgs{
			Name: "Luxembourg-2",
		}, nil)
		if err != nil {
			return err
		}
		pool, err := gcore.LookupLbpool(ctx, &gcore.LookupLbpoolArgs{
			RegionId:  pulumi.Float64Ref(region.Id),
			ProjectId: pulumi.Float64Ref(project.Id),
			Name:      "test-pool",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("view", pool)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcore = Pulumi.Gcore;

return await Deployment.RunAsync(() => 
{
    var project = Gcore.GetProject.Invoke(new()
    {
        Name = "Default",
    });

    var region = Gcore.GetRegion.Invoke(new()
    {
        Name = "Luxembourg-2",
    });

    var pool = Gcore.GetLbpool.Invoke(new()
    {
        RegionId = region.Apply(getRegionResult => getRegionResult.Id),
        ProjectId = project.Apply(getProjectResult => getProjectResult.Id),
        Name = "test-pool",
    });

    return new Dictionary<string, object?>
    {
        ["view"] = pool,
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcore.GcoreFunctions;
import com.pulumi.gcore.inputs.GetProjectArgs;
import com.pulumi.gcore.inputs.GetRegionArgs;
import com.pulumi.gcore.inputs.GetLbpoolArgs;
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 project = GcoreFunctions.getProject(GetProjectArgs.builder()
            .name("Default")
            .build());

        final var region = GcoreFunctions.getRegion(GetRegionArgs.builder()
            .name("Luxembourg-2")
            .build());

        final var pool = GcoreFunctions.getLbpool(GetLbpoolArgs.builder()
            .regionId(region.applyValue(getRegionResult -> getRegionResult.id()))
            .projectId(project.applyValue(getProjectResult -> getProjectResult.id()))
            .name("test-pool")
            .build());

        ctx.export("view", pool.applyValue(getLbpoolResult -> getLbpoolResult));
    }
}
Copy
variables:
  project:
    fn::invoke:
      function: gcore:getProject
      arguments:
        name: Default
  region:
    fn::invoke:
      function: gcore:getRegion
      arguments:
        name: Luxembourg-2
  pool:
    fn::invoke:
      function: gcore:getLbpool
      arguments:
        regionId: ${region.id}
        projectId: ${project.id}
        name: test-pool
outputs:
  view: ${pool}
Copy

Using getLbpool

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 getLbpool(args: GetLbpoolArgs, opts?: InvokeOptions): Promise<GetLbpoolResult>
function getLbpoolOutput(args: GetLbpoolOutputArgs, opts?: InvokeOptions): Output<GetLbpoolResult>
Copy
def get_lbpool(id: Optional[str] = None,
               listener_id: Optional[str] = None,
               loadbalancer_id: Optional[str] = None,
               name: Optional[str] = None,
               project_id: Optional[float] = None,
               project_name: Optional[str] = None,
               region_id: Optional[float] = None,
               region_name: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetLbpoolResult
def get_lbpool_output(id: Optional[pulumi.Input[str]] = None,
               listener_id: Optional[pulumi.Input[str]] = None,
               loadbalancer_id: Optional[pulumi.Input[str]] = None,
               name: Optional[pulumi.Input[str]] = None,
               project_id: Optional[pulumi.Input[float]] = None,
               project_name: Optional[pulumi.Input[str]] = None,
               region_id: Optional[pulumi.Input[float]] = None,
               region_name: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetLbpoolResult]
Copy
func LookupLbpool(ctx *Context, args *LookupLbpoolArgs, opts ...InvokeOption) (*LookupLbpoolResult, error)
func LookupLbpoolOutput(ctx *Context, args *LookupLbpoolOutputArgs, opts ...InvokeOption) LookupLbpoolResultOutput
Copy

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

public static class GetLbpool 
{
    public static Task<GetLbpoolResult> InvokeAsync(GetLbpoolArgs args, InvokeOptions? opts = null)
    public static Output<GetLbpoolResult> Invoke(GetLbpoolInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetLbpoolResult> getLbpool(GetLbpoolArgs args, InvokeOptions options)
public static Output<GetLbpoolResult> getLbpool(GetLbpoolArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: gcore:index/getLbpool:getLbpool
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
Name of the load balancer pool.
Id string
The ID of this resource.
ListenerId string
ID of the load balancer listener to which pool was attached.
LoadbalancerId string
ID of the load balancer to which pool was attached.
ProjectId double
ID of the project in which load balancer pool was created.
ProjectName string
Name of the project in which load balancer pool was created.
RegionId double
ID of the region in which load balancer pool was created.
RegionName string
Name of the region in which load balancer pool was created.
Name This property is required. string
Name of the load balancer pool.
Id string
The ID of this resource.
ListenerId string
ID of the load balancer listener to which pool was attached.
LoadbalancerId string
ID of the load balancer to which pool was attached.
ProjectId float64
ID of the project in which load balancer pool was created.
ProjectName string
Name of the project in which load balancer pool was created.
RegionId float64
ID of the region in which load balancer pool was created.
RegionName string
Name of the region in which load balancer pool was created.
name This property is required. String
Name of the load balancer pool.
id String
The ID of this resource.
listenerId String
ID of the load balancer listener to which pool was attached.
loadbalancerId String
ID of the load balancer to which pool was attached.
projectId Double
ID of the project in which load balancer pool was created.
projectName String
Name of the project in which load balancer pool was created.
regionId Double
ID of the region in which load balancer pool was created.
regionName String
Name of the region in which load balancer pool was created.
name This property is required. string
Name of the load balancer pool.
id string
The ID of this resource.
listenerId string
ID of the load balancer listener to which pool was attached.
loadbalancerId string
ID of the load balancer to which pool was attached.
projectId number
ID of the project in which load balancer pool was created.
projectName string
Name of the project in which load balancer pool was created.
regionId number
ID of the region in which load balancer pool was created.
regionName string
Name of the region in which load balancer pool was created.
name This property is required. str
Name of the load balancer pool.
id str
The ID of this resource.
listener_id str
ID of the load balancer listener to which pool was attached.
loadbalancer_id str
ID of the load balancer to which pool was attached.
project_id float
ID of the project in which load balancer pool was created.
project_name str
Name of the project in which load balancer pool was created.
region_id float
ID of the region in which load balancer pool was created.
region_name str
Name of the region in which load balancer pool was created.
name This property is required. String
Name of the load balancer pool.
id String
The ID of this resource.
listenerId String
ID of the load balancer listener to which pool was attached.
loadbalancerId String
ID of the load balancer to which pool was attached.
projectId Number
ID of the project in which load balancer pool was created.
projectName String
Name of the project in which load balancer pool was created.
regionId Number
ID of the region in which load balancer pool was created.
regionName String
Name of the region in which load balancer pool was created.

getLbpool Result

The following output properties are available:

HealthMonitors List<GetLbpoolHealthMonitor>
Health Monitor settings for defining health state of members inside this pool.
Id string
The ID of this resource.
LbAlgorithm string
Available values is 'ROUNDROBIN', 'LEASTCONNECTIONS', 'SOURCE_IP'
ListenerId string
ID of the load balancer listener to which pool was attached.
LoadbalancerId string
ID of the load balancer to which pool was attached.
Name string
Name of the load balancer pool.
Protocol string
Available values are 'HTTP', 'HTTPS', 'TCP', 'UDP', 'PROXY', 'PROXYV2'
SessionPersistences List<GetLbpoolSessionPersistence>
Pool session persistence tells the load balancer to attempt to send future requests from a client to the same backend member as the initial request.
ProjectId double
ID of the project in which load balancer pool was created.
ProjectName string
Name of the project in which load balancer pool was created.
RegionId double
ID of the region in which load balancer pool was created.
RegionName string
Name of the region in which load balancer pool was created.
HealthMonitors []GetLbpoolHealthMonitor
Health Monitor settings for defining health state of members inside this pool.
Id string
The ID of this resource.
LbAlgorithm string
Available values is 'ROUNDROBIN', 'LEASTCONNECTIONS', 'SOURCE_IP'
ListenerId string
ID of the load balancer listener to which pool was attached.
LoadbalancerId string
ID of the load balancer to which pool was attached.
Name string
Name of the load balancer pool.
Protocol string
Available values are 'HTTP', 'HTTPS', 'TCP', 'UDP', 'PROXY', 'PROXYV2'
SessionPersistences []GetLbpoolSessionPersistence
Pool session persistence tells the load balancer to attempt to send future requests from a client to the same backend member as the initial request.
ProjectId float64
ID of the project in which load balancer pool was created.
ProjectName string
Name of the project in which load balancer pool was created.
RegionId float64
ID of the region in which load balancer pool was created.
RegionName string
Name of the region in which load balancer pool was created.
healthMonitors List<GetLbpoolHealthMonitor>
Health Monitor settings for defining health state of members inside this pool.
id String
The ID of this resource.
lbAlgorithm String
Available values is 'ROUNDROBIN', 'LEASTCONNECTIONS', 'SOURCE_IP'
listenerId String
ID of the load balancer listener to which pool was attached.
loadbalancerId String
ID of the load balancer to which pool was attached.
name String
Name of the load balancer pool.
protocol String
Available values are 'HTTP', 'HTTPS', 'TCP', 'UDP', 'PROXY', 'PROXYV2'
sessionPersistences List<GetLbpoolSessionPersistence>
Pool session persistence tells the load balancer to attempt to send future requests from a client to the same backend member as the initial request.
projectId Double
ID of the project in which load balancer pool was created.
projectName String
Name of the project in which load balancer pool was created.
regionId Double
ID of the region in which load balancer pool was created.
regionName String
Name of the region in which load balancer pool was created.
healthMonitors GetLbpoolHealthMonitor[]
Health Monitor settings for defining health state of members inside this pool.
id string
The ID of this resource.
lbAlgorithm string
Available values is 'ROUNDROBIN', 'LEASTCONNECTIONS', 'SOURCE_IP'
listenerId string
ID of the load balancer listener to which pool was attached.
loadbalancerId string
ID of the load balancer to which pool was attached.
name string
Name of the load balancer pool.
protocol string
Available values are 'HTTP', 'HTTPS', 'TCP', 'UDP', 'PROXY', 'PROXYV2'
sessionPersistences GetLbpoolSessionPersistence[]
Pool session persistence tells the load balancer to attempt to send future requests from a client to the same backend member as the initial request.
projectId number
ID of the project in which load balancer pool was created.
projectName string
Name of the project in which load balancer pool was created.
regionId number
ID of the region in which load balancer pool was created.
regionName string
Name of the region in which load balancer pool was created.
health_monitors Sequence[GetLbpoolHealthMonitor]
Health Monitor settings for defining health state of members inside this pool.
id str
The ID of this resource.
lb_algorithm str
Available values is 'ROUNDROBIN', 'LEASTCONNECTIONS', 'SOURCE_IP'
listener_id str
ID of the load balancer listener to which pool was attached.
loadbalancer_id str
ID of the load balancer to which pool was attached.
name str
Name of the load balancer pool.
protocol str
Available values are 'HTTP', 'HTTPS', 'TCP', 'UDP', 'PROXY', 'PROXYV2'
session_persistences Sequence[GetLbpoolSessionPersistence]
Pool session persistence tells the load balancer to attempt to send future requests from a client to the same backend member as the initial request.
project_id float
ID of the project in which load balancer pool was created.
project_name str
Name of the project in which load balancer pool was created.
region_id float
ID of the region in which load balancer pool was created.
region_name str
Name of the region in which load balancer pool was created.
healthMonitors List<Property Map>
Health Monitor settings for defining health state of members inside this pool.
id String
The ID of this resource.
lbAlgorithm String
Available values is 'ROUNDROBIN', 'LEASTCONNECTIONS', 'SOURCE_IP'
listenerId String
ID of the load balancer listener to which pool was attached.
loadbalancerId String
ID of the load balancer to which pool was attached.
name String
Name of the load balancer pool.
protocol String
Available values are 'HTTP', 'HTTPS', 'TCP', 'UDP', 'PROXY', 'PROXYV2'
sessionPersistences List<Property Map>
Pool session persistence tells the load balancer to attempt to send future requests from a client to the same backend member as the initial request.
projectId Number
ID of the project in which load balancer pool was created.
projectName String
Name of the project in which load balancer pool was created.
regionId Number
ID of the region in which load balancer pool was created.
regionName String
Name of the region in which load balancer pool was created.

Supporting Types

GetLbpoolHealthMonitor

Delay This property is required. double
ExpectedCodes This property is required. string
HttpMethod This property is required. string
Id This property is required. string
MaxRetries This property is required. double
MaxRetriesDown This property is required. double
Timeout This property is required. double
Type This property is required. string
UrlPath This property is required. string
Delay This property is required. float64
ExpectedCodes This property is required. string
HttpMethod This property is required. string
Id This property is required. string
MaxRetries This property is required. float64
MaxRetriesDown This property is required. float64
Timeout This property is required. float64
Type This property is required. string
UrlPath This property is required. string
delay This property is required. Double
expectedCodes This property is required. String
httpMethod This property is required. String
id This property is required. String
maxRetries This property is required. Double
maxRetriesDown This property is required. Double
timeout This property is required. Double
type This property is required. String
urlPath This property is required. String
delay This property is required. number
expectedCodes This property is required. string
httpMethod This property is required. string
id This property is required. string
maxRetries This property is required. number
maxRetriesDown This property is required. number
timeout This property is required. number
type This property is required. string
urlPath This property is required. string
delay This property is required. float
expected_codes This property is required. str
http_method This property is required. str
id This property is required. str
max_retries This property is required. float
max_retries_down This property is required. float
timeout This property is required. float
type This property is required. str
url_path This property is required. str
delay This property is required. Number
expectedCodes This property is required. String
httpMethod This property is required. String
id This property is required. String
maxRetries This property is required. Number
maxRetriesDown This property is required. Number
timeout This property is required. Number
type This property is required. String
urlPath This property is required. String

GetLbpoolSessionPersistence

CookieName This property is required. string
PersistenceGranularity This property is required. string
PersistenceTimeout This property is required. double
Type This property is required. string
CookieName This property is required. string
PersistenceGranularity This property is required. string
PersistenceTimeout This property is required. float64
Type This property is required. string
cookieName This property is required. String
persistenceGranularity This property is required. String
persistenceTimeout This property is required. Double
type This property is required. String
cookieName This property is required. string
persistenceGranularity This property is required. string
persistenceTimeout This property is required. number
type This property is required. string
cookie_name This property is required. str
persistence_granularity This property is required. str
persistence_timeout This property is required. float
type This property is required. str
cookieName This property is required. String
persistenceGranularity This property is required. String
persistenceTimeout This property is required. Number
type This property is required. String

Package Details

Repository
gcore g-core/terraform-provider-gcore
License
Notes
This Pulumi package is based on the gcore Terraform Provider.
gcore 0.19.0 published on Monday, Apr 14, 2025 by g-core