Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

LoadBalancerPool

Provides a Cloudflare Load Balancer pool resource. This provides a pool of origins that can be used by a Cloudflare Load Balancer. Note that the load balancing feature must be enabled in your Cloudflare account before you can use this resource.

Example Usage

using Pulumi;
using Cloudflare = Pulumi.Cloudflare;

class MyStack : Stack
{
    public MyStack()
    {
        var foo = new Cloudflare.LoadBalancerPool("foo", new Cloudflare.LoadBalancerPoolArgs
        {
            Description = "example load balancer pool",
            Enabled = false,
            MinimumOrigins = 1,
            Name = "example-pool",
            NotificationEmail = "someone@example.com",
            Origins = 
            {
                new Cloudflare.Inputs.LoadBalancerPoolOriginArgs
                {
                    Address = "192.0.2.1",
                    Enabled = false,
                    Name = "example-1",
                },
                new Cloudflare.Inputs.LoadBalancerPoolOriginArgs
                {
                    Address = "192.0.2.2",
                    Name = "example-2",
                },
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-cloudflare/sdk/v2/go/cloudflare"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := cloudflare.NewLoadBalancerPool(ctx, "foo", &cloudflare.LoadBalancerPoolArgs{
            Description:       pulumi.String("example load balancer pool"),
            Enabled:           pulumi.Bool(false),
            MinimumOrigins:    pulumi.Int(1),
            Name:              pulumi.String("example-pool"),
            NotificationEmail: pulumi.String("someone@example.com"),
            Origins: cloudflare.LoadBalancerPoolOriginArray{
                &cloudflare.LoadBalancerPoolOriginArgs{
                    Address: pulumi.String("192.0.2.1"),
                    Enabled: pulumi.Bool(false),
                    Name:    pulumi.String("example-1"),
                },
                &cloudflare.LoadBalancerPoolOriginArgs{
                    Address: pulumi.String("192.0.2.2"),
                    Name:    pulumi.String("example-2"),
                },
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_cloudflare as cloudflare

foo = cloudflare.LoadBalancerPool("foo",
    description="example load balancer pool",
    enabled=False,
    minimum_origins=1,
    name="example-pool",
    notification_email="someone@example.com",
    origins=[
        cloudflare.LoadBalancerPoolOriginArgs(
            address="192.0.2.1",
            enabled=False,
            name="example-1",
        ),
        cloudflare.LoadBalancerPoolOriginArgs(
            address="192.0.2.2",
            name="example-2",
        ),
    ])
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";

const foo = new cloudflare.LoadBalancerPool("foo", {
    description: "example load balancer pool",
    enabled: false,
    minimumOrigins: 1,
    name: "example-pool",
    notificationEmail: "someone@example.com",
    origins: [
        {
            address: "192.0.2.1",
            enabled: false,
            name: "example-1",
        },
        {
            address: "192.0.2.2",
            name: "example-2",
        },
    ],
});

Create a LoadBalancerPool Resource

new LoadBalancerPool(name: string, args: LoadBalancerPoolArgs, opts?: CustomResourceOptions);
def LoadBalancerPool(resource_name: str, opts: Optional[ResourceOptions] = None, check_regions: Optional[Sequence[str]] = None, description: Optional[str] = None, enabled: Optional[bool] = None, minimum_origins: Optional[int] = None, monitor: Optional[str] = None, name: Optional[str] = None, notification_email: Optional[str] = None, origins: Optional[Sequence[LoadBalancerPoolOriginArgs]] = None)
func NewLoadBalancerPool(ctx *Context, name string, args LoadBalancerPoolArgs, opts ...ResourceOption) (*LoadBalancerPool, error)
public LoadBalancerPool(string name, LoadBalancerPoolArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args LoadBalancerPoolArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args LoadBalancerPoolArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args LoadBalancerPoolArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

LoadBalancerPool Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The LoadBalancerPool resource accepts the following input properties:

Name string

A human-identifiable name for the origin.

Origins List<LoadBalancerPoolOriginArgs>

The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy. It’s a complex value. See description below.

CheckRegions List<string>

A list of regions (specified by region code) from which to run health checks. Empty means every Cloudflare data center (the default), but requires an Enterprise plan. Region codes can be found here.

Description string

Free text description.

Enabled bool

Whether to enable (the default) this origin within the Pool. Disabled origins will not receive traffic and are excluded from health checks. The origin will only be disabled for the current pool.

MinimumOrigins int

The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and we will failover to the next available pool. Default: 1.

Monitor string

The ID of the Monitor to use for health checking origins within this pool.

NotificationEmail string

The email address to send health status notifications to. This can be an individual mailbox or a mailing list. Multiple emails can be supplied as a comma delimited list.

Name string

A human-identifiable name for the origin.

Origins []LoadBalancerPoolOrigin

The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy. It’s a complex value. See description below.

CheckRegions []string

A list of regions (specified by region code) from which to run health checks. Empty means every Cloudflare data center (the default), but requires an Enterprise plan. Region codes can be found here.

Description string

Free text description.

Enabled bool

Whether to enable (the default) this origin within the Pool. Disabled origins will not receive traffic and are excluded from health checks. The origin will only be disabled for the current pool.

MinimumOrigins int

The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and we will failover to the next available pool. Default: 1.

Monitor string

The ID of the Monitor to use for health checking origins within this pool.

NotificationEmail string

The email address to send health status notifications to. This can be an individual mailbox or a mailing list. Multiple emails can be supplied as a comma delimited list.

name string

A human-identifiable name for the origin.

origins LoadBalancerPoolOrigin[]

The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy. It’s a complex value. See description below.

checkRegions string[]

A list of regions (specified by region code) from which to run health checks. Empty means every Cloudflare data center (the default), but requires an Enterprise plan. Region codes can be found here.

description string

Free text description.

enabled boolean

Whether to enable (the default) this origin within the Pool. Disabled origins will not receive traffic and are excluded from health checks. The origin will only be disabled for the current pool.

minimumOrigins number

The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and we will failover to the next available pool. Default: 1.

monitor string

The ID of the Monitor to use for health checking origins within this pool.

notificationEmail string

The email address to send health status notifications to. This can be an individual mailbox or a mailing list. Multiple emails can be supplied as a comma delimited list.

name str

A human-identifiable name for the origin.

origins Sequence[LoadBalancerPoolOriginArgs]

The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy. It’s a complex value. See description below.

check_regions Sequence[str]

A list of regions (specified by region code) from which to run health checks. Empty means every Cloudflare data center (the default), but requires an Enterprise plan. Region codes can be found here.

description str

Free text description.

enabled bool

Whether to enable (the default) this origin within the Pool. Disabled origins will not receive traffic and are excluded from health checks. The origin will only be disabled for the current pool.

minimum_origins int

The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and we will failover to the next available pool. Default: 1.

monitor str

The ID of the Monitor to use for health checking origins within this pool.

notification_email str

The email address to send health status notifications to. This can be an individual mailbox or a mailing list. Multiple emails can be supplied as a comma delimited list.

Outputs

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

CreatedOn string

The RFC3339 timestamp of when the load balancer was created.

Id string
The provider-assigned unique ID for this managed resource.
ModifiedOn string

The RFC3339 timestamp of when the load balancer was last modified.

CreatedOn string

The RFC3339 timestamp of when the load balancer was created.

Id string
The provider-assigned unique ID for this managed resource.
ModifiedOn string

The RFC3339 timestamp of when the load balancer was last modified.

createdOn string

The RFC3339 timestamp of when the load balancer was created.

id string
The provider-assigned unique ID for this managed resource.
modifiedOn string

The RFC3339 timestamp of when the load balancer was last modified.

created_on str

The RFC3339 timestamp of when the load balancer was created.

id str
The provider-assigned unique ID for this managed resource.
modified_on str

The RFC3339 timestamp of when the load balancer was last modified.

Look up an Existing LoadBalancerPool Resource

Get an existing LoadBalancerPool 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?: LoadBalancerPoolState, opts?: CustomResourceOptions): LoadBalancerPool
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, check_regions: Optional[Sequence[str]] = None, created_on: Optional[str] = None, description: Optional[str] = None, enabled: Optional[bool] = None, minimum_origins: Optional[int] = None, modified_on: Optional[str] = None, monitor: Optional[str] = None, name: Optional[str] = None, notification_email: Optional[str] = None, origins: Optional[Sequence[LoadBalancerPoolOriginArgs]] = None) -> LoadBalancerPool
func GetLoadBalancerPool(ctx *Context, name string, id IDInput, state *LoadBalancerPoolState, opts ...ResourceOption) (*LoadBalancerPool, error)
public static LoadBalancerPool Get(string name, Input<string> id, LoadBalancerPoolState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

CheckRegions List<string>

A list of regions (specified by region code) from which to run health checks. Empty means every Cloudflare data center (the default), but requires an Enterprise plan. Region codes can be found here.

CreatedOn string

The RFC3339 timestamp of when the load balancer was created.

Description string

Free text description.

Enabled bool

Whether to enable (the default) this origin within the Pool. Disabled origins will not receive traffic and are excluded from health checks. The origin will only be disabled for the current pool.

MinimumOrigins int

The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and we will failover to the next available pool. Default: 1.

ModifiedOn string

The RFC3339 timestamp of when the load balancer was last modified.

Monitor string

The ID of the Monitor to use for health checking origins within this pool.

Name string

A human-identifiable name for the origin.

NotificationEmail string

The email address to send health status notifications to. This can be an individual mailbox or a mailing list. Multiple emails can be supplied as a comma delimited list.

Origins List<LoadBalancerPoolOriginArgs>

The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy. It’s a complex value. See description below.

CheckRegions []string

A list of regions (specified by region code) from which to run health checks. Empty means every Cloudflare data center (the default), but requires an Enterprise plan. Region codes can be found here.

CreatedOn string

The RFC3339 timestamp of when the load balancer was created.

Description string

Free text description.

Enabled bool

Whether to enable (the default) this origin within the Pool. Disabled origins will not receive traffic and are excluded from health checks. The origin will only be disabled for the current pool.

MinimumOrigins int

The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and we will failover to the next available pool. Default: 1.

ModifiedOn string

The RFC3339 timestamp of when the load balancer was last modified.

Monitor string

The ID of the Monitor to use for health checking origins within this pool.

Name string

A human-identifiable name for the origin.

NotificationEmail string

The email address to send health status notifications to. This can be an individual mailbox or a mailing list. Multiple emails can be supplied as a comma delimited list.

Origins []LoadBalancerPoolOrigin

The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy. It’s a complex value. See description below.

checkRegions string[]

A list of regions (specified by region code) from which to run health checks. Empty means every Cloudflare data center (the default), but requires an Enterprise plan. Region codes can be found here.

createdOn string

The RFC3339 timestamp of when the load balancer was created.

description string

Free text description.

enabled boolean

Whether to enable (the default) this origin within the Pool. Disabled origins will not receive traffic and are excluded from health checks. The origin will only be disabled for the current pool.

minimumOrigins number

The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and we will failover to the next available pool. Default: 1.

modifiedOn string

The RFC3339 timestamp of when the load balancer was last modified.

monitor string

The ID of the Monitor to use for health checking origins within this pool.

name string

A human-identifiable name for the origin.

notificationEmail string

The email address to send health status notifications to. This can be an individual mailbox or a mailing list. Multiple emails can be supplied as a comma delimited list.

origins LoadBalancerPoolOrigin[]

The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy. It’s a complex value. See description below.

check_regions Sequence[str]

A list of regions (specified by region code) from which to run health checks. Empty means every Cloudflare data center (the default), but requires an Enterprise plan. Region codes can be found here.

created_on str

The RFC3339 timestamp of when the load balancer was created.

description str

Free text description.

enabled bool

Whether to enable (the default) this origin within the Pool. Disabled origins will not receive traffic and are excluded from health checks. The origin will only be disabled for the current pool.

minimum_origins int

The minimum number of origins that must be healthy for this pool to serve traffic. If the number of healthy origins falls below this number, the pool will be marked unhealthy and we will failover to the next available pool. Default: 1.

modified_on str

The RFC3339 timestamp of when the load balancer was last modified.

monitor str

The ID of the Monitor to use for health checking origins within this pool.

name str

A human-identifiable name for the origin.

notification_email str

The email address to send health status notifications to. This can be an individual mailbox or a mailing list. Multiple emails can be supplied as a comma delimited list.

origins Sequence[LoadBalancerPoolOriginArgs]

The list of origins within this pool. Traffic directed at this pool is balanced across all currently healthy origins, provided the pool itself is healthy. It’s a complex value. See description below.

Supporting Types

LoadBalancerPoolOrigin

Address string

The IP address (IPv4 or IPv6) of the origin, or the publicly addressable hostname. Hostnames entered here should resolve directly to the origin, and not be a hostname proxied by Cloudflare.

Name string

A human-identifiable name for the origin.

Enabled bool

Whether to enable (the default) this origin within the Pool. Disabled origins will not receive traffic and are excluded from health checks. The origin will only be disabled for the current pool.

Weight double

The weight (0.01 - 1.00) of this origin, relative to other origins in the pool. Equal values mean equal weighting. A weight of 0 means traffic will not be sent to this origin, but health is still checked. Default: 1.

Address string

The IP address (IPv4 or IPv6) of the origin, or the publicly addressable hostname. Hostnames entered here should resolve directly to the origin, and not be a hostname proxied by Cloudflare.

Name string

A human-identifiable name for the origin.

Enabled bool

Whether to enable (the default) this origin within the Pool. Disabled origins will not receive traffic and are excluded from health checks. The origin will only be disabled for the current pool.

Weight float64

The weight (0.01 - 1.00) of this origin, relative to other origins in the pool. Equal values mean equal weighting. A weight of 0 means traffic will not be sent to this origin, but health is still checked. Default: 1.

address string

The IP address (IPv4 or IPv6) of the origin, or the publicly addressable hostname. Hostnames entered here should resolve directly to the origin, and not be a hostname proxied by Cloudflare.

name string

A human-identifiable name for the origin.

enabled boolean

Whether to enable (the default) this origin within the Pool. Disabled origins will not receive traffic and are excluded from health checks. The origin will only be disabled for the current pool.

weight number

The weight (0.01 - 1.00) of this origin, relative to other origins in the pool. Equal values mean equal weighting. A weight of 0 means traffic will not be sent to this origin, but health is still checked. Default: 1.

address str

The IP address (IPv4 or IPv6) of the origin, or the publicly addressable hostname. Hostnames entered here should resolve directly to the origin, and not be a hostname proxied by Cloudflare.

name str

A human-identifiable name for the origin.

enabled bool

Whether to enable (the default) this origin within the Pool. Disabled origins will not receive traffic and are excluded from health checks. The origin will only be disabled for the current pool.

weight float

The weight (0.01 - 1.00) of this origin, relative to other origins in the pool. Equal values mean equal weighting. A weight of 0 means traffic will not be sent to this origin, but health is still checked. Default: 1.

Package Details

Repository
https://github.com/pulumi/pulumi-cloudflare
License
Apache-2.0
Notes
This Pulumi package is based on the cloudflare Terraform Provider.