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

LoadBalancer

Provides a Cloudflare Load Balancer resource. This sits in front of a number of defined pools of origins and provides various options for geographically-aware load balancing. 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
        {
            Name = "example-lb-pool",
            Origins = 
            {
                new Cloudflare.Inputs.LoadBalancerPoolOriginArgs
                {
                    Name = "example-1",
                    Address = "192.0.2.1",
                    Enabled = false,
                },
            },
        });
        // Define a load balancer which always points to a pool we define below
        // In normal usage, would have different pools set for different pops (cloudflare points-of-presence) and/or for different regions
        // Within each pop or region we can define multiple pools in failover order
        var bar = new Cloudflare.LoadBalancer("bar", new Cloudflare.LoadBalancerArgs
        {
            ZoneId = "d41d8cd98f00b204e9800998ecf8427e",
            Name = "example-load-balancer.example.com",
            FallbackPoolId = foo.Id,
            DefaultPoolIds = 
            {
                foo.Id,
            },
            Description = "example load balancer using geo-balancing",
            Proxied = true,
            SteeringPolicy = "geo",
            PopPools = 
            {
                new Cloudflare.Inputs.LoadBalancerPopPoolArgs
                {
                    Pop = "LAX",
                    PoolIds = 
                    {
                        foo.Id,
                    },
                },
            },
            RegionPools = 
            {
                new Cloudflare.Inputs.LoadBalancerRegionPoolArgs
                {
                    Region = "WNAM",
                    PoolIds = 
                    {
                        foo.Id,
                    },
                },
            },
        });
    }

}
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 {
        foo, err := cloudflare.NewLoadBalancerPool(ctx, "foo", &cloudflare.LoadBalancerPoolArgs{
            Name: pulumi.String("example-lb-pool"),
            Origins: cloudflare.LoadBalancerPoolOriginArray{
                &cloudflare.LoadBalancerPoolOriginArgs{
                    Name:    pulumi.String("example-1"),
                    Address: pulumi.String("192.0.2.1"),
                    Enabled: pulumi.Bool(false),
                },
            },
        })
        if err != nil {
            return err
        }
        _, err = cloudflare.NewLoadBalancer(ctx, "bar", &cloudflare.LoadBalancerArgs{
            ZoneId:         pulumi.String("d41d8cd98f00b204e9800998ecf8427e"),
            Name:           pulumi.String("example-load-balancer.example.com"),
            FallbackPoolId: foo.ID(),
            DefaultPoolIds: pulumi.StringArray{
                foo.ID(),
            },
            Description:    pulumi.String("example load balancer using geo-balancing"),
            Proxied:        pulumi.Bool(true),
            SteeringPolicy: pulumi.String("geo"),
            PopPools: cloudflare.LoadBalancerPopPoolArray{
                &cloudflare.LoadBalancerPopPoolArgs{
                    Pop: pulumi.String("LAX"),
                    PoolIds: pulumi.StringArray{
                        foo.ID(),
                    },
                },
            },
            RegionPools: cloudflare.LoadBalancerRegionPoolArray{
                &cloudflare.LoadBalancerRegionPoolArgs{
                    Region: pulumi.String("WNAM"),
                    PoolIds: pulumi.StringArray{
                        foo.ID(),
                    },
                },
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_cloudflare as cloudflare

foo = cloudflare.LoadBalancerPool("foo",
    name="example-lb-pool",
    origins=[cloudflare.LoadBalancerPoolOriginArgs(
        name="example-1",
        address="192.0.2.1",
        enabled=False,
    )])
# Define a load balancer which always points to a pool we define below
# In normal usage, would have different pools set for different pops (cloudflare points-of-presence) and/or for different regions
# Within each pop or region we can define multiple pools in failover order
bar = cloudflare.LoadBalancer("bar",
    zone_id="d41d8cd98f00b204e9800998ecf8427e",
    name="example-load-balancer.example.com",
    fallback_pool_id=foo.id,
    default_pool_ids=[foo.id],
    description="example load balancer using geo-balancing",
    proxied=True,
    steering_policy="geo",
    pop_pools=[cloudflare.LoadBalancerPopPoolArgs(
        pop="LAX",
        pool_ids=[foo.id],
    )],
    region_pools=[cloudflare.LoadBalancerRegionPoolArgs(
        region="WNAM",
        pool_ids=[foo.id],
    )])
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";

const foo = new cloudflare.LoadBalancerPool("foo", {
    name: "example-lb-pool",
    origins: [{
        name: "example-1",
        address: "192.0.2.1",
        enabled: false,
    }],
});
// Define a load balancer which always points to a pool we define below
// In normal usage, would have different pools set for different pops (cloudflare points-of-presence) and/or for different regions
// Within each pop or region we can define multiple pools in failover order
const bar = new cloudflare.LoadBalancer("bar", {
    zoneId: "d41d8cd98f00b204e9800998ecf8427e",
    name: "example-load-balancer.example.com",
    fallbackPoolId: foo.id,
    defaultPoolIds: [foo.id],
    description: "example load balancer using geo-balancing",
    proxied: true,
    steeringPolicy: "geo",
    popPools: [{
        pop: "LAX",
        poolIds: [foo.id],
    }],
    regionPools: [{
        region: "WNAM",
        poolIds: [foo.id],
    }],
});

Create a LoadBalancer Resource

new LoadBalancer(name: string, args: LoadBalancerArgs, opts?: CustomResourceOptions);
def LoadBalancer(resource_name: str, opts: Optional[ResourceOptions] = None, default_pool_ids: Optional[Sequence[str]] = None, description: Optional[str] = None, enabled: Optional[bool] = None, fallback_pool_id: Optional[str] = None, name: Optional[str] = None, pop_pools: Optional[Sequence[LoadBalancerPopPoolArgs]] = None, proxied: Optional[bool] = None, region_pools: Optional[Sequence[LoadBalancerRegionPoolArgs]] = None, session_affinity: Optional[str] = None, session_affinity_attributes: Optional[Mapping[str, str]] = None, session_affinity_ttl: Optional[int] = None, steering_policy: Optional[str] = None, ttl: Optional[int] = None, zone_id: Optional[str] = None)
func NewLoadBalancer(ctx *Context, name string, args LoadBalancerArgs, opts ...ResourceOption) (*LoadBalancer, error)
public LoadBalancer(string name, LoadBalancerArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args LoadBalancerArgs
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 LoadBalancerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args LoadBalancerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

LoadBalancer Resource Properties

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

Inputs

The LoadBalancer resource accepts the following input properties:

DefaultPoolIds List<string>

A list of pool IDs ordered by their failover priority. Used whenever region/pop pools are not defined.

FallbackPoolId string

The pool ID to use when all other pools are detected as unhealthy.

Name string

The DNS name (FQDN, including the zone) to associate with the load balancer.

ZoneId string

The zone ID to add the load balancer to.

Description string

Free text description.

Enabled bool

Enable or disable the load balancer. Defaults to true (enabled).

PopPools List<LoadBalancerPopPoolArgs>

A set containing mappings of Cloudflare Point-of-Presence (PoP) identifiers to a list of pool IDs (ordered by their failover priority) for the PoP (datacenter). This feature is only available to enterprise customers. Fields documented below.

Proxied bool

Whether the hostname gets Cloudflare’s origin protection. Defaults to false.

RegionPools List<LoadBalancerRegionPoolArgs>

A set containing mappings of region/country codes to a list of pool IDs (ordered by their failover priority) for the given region. Fields documented below.

SessionAffinity string

Associates all requests coming from an end-user with a single origin. Cloudflare will set a cookie on the initial response to the client, such that consequent requests with the cookie in the request will go to the same origin, so long as it is available. Valid values are: "", "none", "cookie", and "ip_cookie". Default is "".

SessionAffinityAttributes Dictionary<string, string>

Configure cookie attributes for session affinity cookie. See the field documentation below.

SessionAffinityTtl int

Time, in seconds, until this load balancers session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of 23 hours will be used unless session_affinity_ttl is explicitly set. Once the expiry time has been reached, subsequent requests may get sent to a different origin server. Valid values are between 1800 and 604800.

SteeringPolicy string

Determine which method the load balancer uses to determine the fastest route to your origin. Valid values are: "off", "geo", "dynamic_latency", "random" or "". Default is "".

Ttl int

Time to live (TTL) of this load balancer’s DNS name. Conflicts with proxied - this cannot be set for proxied load balancers. Default is 30.

DefaultPoolIds []string

A list of pool IDs ordered by their failover priority. Used whenever region/pop pools are not defined.

FallbackPoolId string

The pool ID to use when all other pools are detected as unhealthy.

Name string

The DNS name (FQDN, including the zone) to associate with the load balancer.

ZoneId string

The zone ID to add the load balancer to.

Description string

Free text description.

Enabled bool

Enable or disable the load balancer. Defaults to true (enabled).

PopPools []LoadBalancerPopPool

A set containing mappings of Cloudflare Point-of-Presence (PoP) identifiers to a list of pool IDs (ordered by their failover priority) for the PoP (datacenter). This feature is only available to enterprise customers. Fields documented below.

Proxied bool

Whether the hostname gets Cloudflare’s origin protection. Defaults to false.

RegionPools []LoadBalancerRegionPool

A set containing mappings of region/country codes to a list of pool IDs (ordered by their failover priority) for the given region. Fields documented below.

SessionAffinity string

Associates all requests coming from an end-user with a single origin. Cloudflare will set a cookie on the initial response to the client, such that consequent requests with the cookie in the request will go to the same origin, so long as it is available. Valid values are: "", "none", "cookie", and "ip_cookie". Default is "".

SessionAffinityAttributes map[string]string

Configure cookie attributes for session affinity cookie. See the field documentation below.

SessionAffinityTtl int

Time, in seconds, until this load balancers session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of 23 hours will be used unless session_affinity_ttl is explicitly set. Once the expiry time has been reached, subsequent requests may get sent to a different origin server. Valid values are between 1800 and 604800.

SteeringPolicy string

Determine which method the load balancer uses to determine the fastest route to your origin. Valid values are: "off", "geo", "dynamic_latency", "random" or "". Default is "".

Ttl int

Time to live (TTL) of this load balancer’s DNS name. Conflicts with proxied - this cannot be set for proxied load balancers. Default is 30.

defaultPoolIds string[]

A list of pool IDs ordered by their failover priority. Used whenever region/pop pools are not defined.

fallbackPoolId string

The pool ID to use when all other pools are detected as unhealthy.

name string

The DNS name (FQDN, including the zone) to associate with the load balancer.

zoneId string

The zone ID to add the load balancer to.

description string

Free text description.

enabled boolean

Enable or disable the load balancer. Defaults to true (enabled).

popPools LoadBalancerPopPool[]

A set containing mappings of Cloudflare Point-of-Presence (PoP) identifiers to a list of pool IDs (ordered by their failover priority) for the PoP (datacenter). This feature is only available to enterprise customers. Fields documented below.

proxied boolean

Whether the hostname gets Cloudflare’s origin protection. Defaults to false.

regionPools LoadBalancerRegionPool[]

A set containing mappings of region/country codes to a list of pool IDs (ordered by their failover priority) for the given region. Fields documented below.

sessionAffinity string

Associates all requests coming from an end-user with a single origin. Cloudflare will set a cookie on the initial response to the client, such that consequent requests with the cookie in the request will go to the same origin, so long as it is available. Valid values are: "", "none", "cookie", and "ip_cookie". Default is "".

sessionAffinityAttributes {[key: string]: string}

Configure cookie attributes for session affinity cookie. See the field documentation below.

sessionAffinityTtl number

Time, in seconds, until this load balancers session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of 23 hours will be used unless session_affinity_ttl is explicitly set. Once the expiry time has been reached, subsequent requests may get sent to a different origin server. Valid values are between 1800 and 604800.

steeringPolicy string

Determine which method the load balancer uses to determine the fastest route to your origin. Valid values are: "off", "geo", "dynamic_latency", "random" or "". Default is "".

ttl number

Time to live (TTL) of this load balancer’s DNS name. Conflicts with proxied - this cannot be set for proxied load balancers. Default is 30.

default_pool_ids Sequence[str]

A list of pool IDs ordered by their failover priority. Used whenever region/pop pools are not defined.

fallback_pool_id str

The pool ID to use when all other pools are detected as unhealthy.

name str

The DNS name (FQDN, including the zone) to associate with the load balancer.

zone_id str

The zone ID to add the load balancer to.

description str

Free text description.

enabled bool

Enable or disable the load balancer. Defaults to true (enabled).

pop_pools Sequence[LoadBalancerPopPoolArgs]

A set containing mappings of Cloudflare Point-of-Presence (PoP) identifiers to a list of pool IDs (ordered by their failover priority) for the PoP (datacenter). This feature is only available to enterprise customers. Fields documented below.

proxied bool

Whether the hostname gets Cloudflare’s origin protection. Defaults to false.

region_pools Sequence[LoadBalancerRegionPoolArgs]

A set containing mappings of region/country codes to a list of pool IDs (ordered by their failover priority) for the given region. Fields documented below.

session_affinity str

Associates all requests coming from an end-user with a single origin. Cloudflare will set a cookie on the initial response to the client, such that consequent requests with the cookie in the request will go to the same origin, so long as it is available. Valid values are: "", "none", "cookie", and "ip_cookie". Default is "".

session_affinity_attributes Mapping[str, str]

Configure cookie attributes for session affinity cookie. See the field documentation below.

session_affinity_ttl int

Time, in seconds, until this load balancers session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of 23 hours will be used unless session_affinity_ttl is explicitly set. Once the expiry time has been reached, subsequent requests may get sent to a different origin server. Valid values are between 1800 and 604800.

steering_policy str

Determine which method the load balancer uses to determine the fastest route to your origin. Valid values are: "off", "geo", "dynamic_latency", "random" or "". Default is "".

ttl int

Time to live (TTL) of this load balancer’s DNS name. Conflicts with proxied - this cannot be set for proxied load balancers. Default is 30.

Outputs

All input properties are implicitly available as output properties. Additionally, the LoadBalancer 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 LoadBalancer Resource

Get an existing LoadBalancer 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?: LoadBalancerState, opts?: CustomResourceOptions): LoadBalancer
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, created_on: Optional[str] = None, default_pool_ids: Optional[Sequence[str]] = None, description: Optional[str] = None, enabled: Optional[bool] = None, fallback_pool_id: Optional[str] = None, modified_on: Optional[str] = None, name: Optional[str] = None, pop_pools: Optional[Sequence[LoadBalancerPopPoolArgs]] = None, proxied: Optional[bool] = None, region_pools: Optional[Sequence[LoadBalancerRegionPoolArgs]] = None, session_affinity: Optional[str] = None, session_affinity_attributes: Optional[Mapping[str, str]] = None, session_affinity_ttl: Optional[int] = None, steering_policy: Optional[str] = None, ttl: Optional[int] = None, zone_id: Optional[str] = None) -> LoadBalancer
func GetLoadBalancer(ctx *Context, name string, id IDInput, state *LoadBalancerState, opts ...ResourceOption) (*LoadBalancer, error)
public static LoadBalancer Get(string name, Input<string> id, LoadBalancerState? 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:

CreatedOn string

The RFC3339 timestamp of when the load balancer was created.

DefaultPoolIds List<string>

A list of pool IDs ordered by their failover priority. Used whenever region/pop pools are not defined.

Description string

Free text description.

Enabled bool

Enable or disable the load balancer. Defaults to true (enabled).

FallbackPoolId string

The pool ID to use when all other pools are detected as unhealthy.

ModifiedOn string

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

Name string

The DNS name (FQDN, including the zone) to associate with the load balancer.

PopPools List<LoadBalancerPopPoolArgs>

A set containing mappings of Cloudflare Point-of-Presence (PoP) identifiers to a list of pool IDs (ordered by their failover priority) for the PoP (datacenter). This feature is only available to enterprise customers. Fields documented below.

Proxied bool

Whether the hostname gets Cloudflare’s origin protection. Defaults to false.

RegionPools List<LoadBalancerRegionPoolArgs>

A set containing mappings of region/country codes to a list of pool IDs (ordered by their failover priority) for the given region. Fields documented below.

SessionAffinity string

Associates all requests coming from an end-user with a single origin. Cloudflare will set a cookie on the initial response to the client, such that consequent requests with the cookie in the request will go to the same origin, so long as it is available. Valid values are: "", "none", "cookie", and "ip_cookie". Default is "".

SessionAffinityAttributes Dictionary<string, string>

Configure cookie attributes for session affinity cookie. See the field documentation below.

SessionAffinityTtl int

Time, in seconds, until this load balancers session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of 23 hours will be used unless session_affinity_ttl is explicitly set. Once the expiry time has been reached, subsequent requests may get sent to a different origin server. Valid values are between 1800 and 604800.

SteeringPolicy string

Determine which method the load balancer uses to determine the fastest route to your origin. Valid values are: "off", "geo", "dynamic_latency", "random" or "". Default is "".

Ttl int

Time to live (TTL) of this load balancer’s DNS name. Conflicts with proxied - this cannot be set for proxied load balancers. Default is 30.

ZoneId string

The zone ID to add the load balancer to.

CreatedOn string

The RFC3339 timestamp of when the load balancer was created.

DefaultPoolIds []string

A list of pool IDs ordered by their failover priority. Used whenever region/pop pools are not defined.

Description string

Free text description.

Enabled bool

Enable or disable the load balancer. Defaults to true (enabled).

FallbackPoolId string

The pool ID to use when all other pools are detected as unhealthy.

ModifiedOn string

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

Name string

The DNS name (FQDN, including the zone) to associate with the load balancer.

PopPools []LoadBalancerPopPool

A set containing mappings of Cloudflare Point-of-Presence (PoP) identifiers to a list of pool IDs (ordered by their failover priority) for the PoP (datacenter). This feature is only available to enterprise customers. Fields documented below.

Proxied bool

Whether the hostname gets Cloudflare’s origin protection. Defaults to false.

RegionPools []LoadBalancerRegionPool

A set containing mappings of region/country codes to a list of pool IDs (ordered by their failover priority) for the given region. Fields documented below.

SessionAffinity string

Associates all requests coming from an end-user with a single origin. Cloudflare will set a cookie on the initial response to the client, such that consequent requests with the cookie in the request will go to the same origin, so long as it is available. Valid values are: "", "none", "cookie", and "ip_cookie". Default is "".

SessionAffinityAttributes map[string]string

Configure cookie attributes for session affinity cookie. See the field documentation below.

SessionAffinityTtl int

Time, in seconds, until this load balancers session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of 23 hours will be used unless session_affinity_ttl is explicitly set. Once the expiry time has been reached, subsequent requests may get sent to a different origin server. Valid values are between 1800 and 604800.

SteeringPolicy string

Determine which method the load balancer uses to determine the fastest route to your origin. Valid values are: "off", "geo", "dynamic_latency", "random" or "". Default is "".

Ttl int

Time to live (TTL) of this load balancer’s DNS name. Conflicts with proxied - this cannot be set for proxied load balancers. Default is 30.

ZoneId string

The zone ID to add the load balancer to.

createdOn string

The RFC3339 timestamp of when the load balancer was created.

defaultPoolIds string[]

A list of pool IDs ordered by their failover priority. Used whenever region/pop pools are not defined.

description string

Free text description.

enabled boolean

Enable or disable the load balancer. Defaults to true (enabled).

fallbackPoolId string

The pool ID to use when all other pools are detected as unhealthy.

modifiedOn string

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

name string

The DNS name (FQDN, including the zone) to associate with the load balancer.

popPools LoadBalancerPopPool[]

A set containing mappings of Cloudflare Point-of-Presence (PoP) identifiers to a list of pool IDs (ordered by their failover priority) for the PoP (datacenter). This feature is only available to enterprise customers. Fields documented below.

proxied boolean

Whether the hostname gets Cloudflare’s origin protection. Defaults to false.

regionPools LoadBalancerRegionPool[]

A set containing mappings of region/country codes to a list of pool IDs (ordered by their failover priority) for the given region. Fields documented below.

sessionAffinity string

Associates all requests coming from an end-user with a single origin. Cloudflare will set a cookie on the initial response to the client, such that consequent requests with the cookie in the request will go to the same origin, so long as it is available. Valid values are: "", "none", "cookie", and "ip_cookie". Default is "".

sessionAffinityAttributes {[key: string]: string}

Configure cookie attributes for session affinity cookie. See the field documentation below.

sessionAffinityTtl number

Time, in seconds, until this load balancers session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of 23 hours will be used unless session_affinity_ttl is explicitly set. Once the expiry time has been reached, subsequent requests may get sent to a different origin server. Valid values are between 1800 and 604800.

steeringPolicy string

Determine which method the load balancer uses to determine the fastest route to your origin. Valid values are: "off", "geo", "dynamic_latency", "random" or "". Default is "".

ttl number

Time to live (TTL) of this load balancer’s DNS name. Conflicts with proxied - this cannot be set for proxied load balancers. Default is 30.

zoneId string

The zone ID to add the load balancer to.

created_on str

The RFC3339 timestamp of when the load balancer was created.

default_pool_ids Sequence[str]

A list of pool IDs ordered by their failover priority. Used whenever region/pop pools are not defined.

description str

Free text description.

enabled bool

Enable or disable the load balancer. Defaults to true (enabled).

fallback_pool_id str

The pool ID to use when all other pools are detected as unhealthy.

modified_on str

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

name str

The DNS name (FQDN, including the zone) to associate with the load balancer.

pop_pools Sequence[LoadBalancerPopPoolArgs]

A set containing mappings of Cloudflare Point-of-Presence (PoP) identifiers to a list of pool IDs (ordered by their failover priority) for the PoP (datacenter). This feature is only available to enterprise customers. Fields documented below.

proxied bool

Whether the hostname gets Cloudflare’s origin protection. Defaults to false.

region_pools Sequence[LoadBalancerRegionPoolArgs]

A set containing mappings of region/country codes to a list of pool IDs (ordered by their failover priority) for the given region. Fields documented below.

session_affinity str

Associates all requests coming from an end-user with a single origin. Cloudflare will set a cookie on the initial response to the client, such that consequent requests with the cookie in the request will go to the same origin, so long as it is available. Valid values are: "", "none", "cookie", and "ip_cookie". Default is "".

session_affinity_attributes Mapping[str, str]

Configure cookie attributes for session affinity cookie. See the field documentation below.

session_affinity_ttl int

Time, in seconds, until this load balancers session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of 23 hours will be used unless session_affinity_ttl is explicitly set. Once the expiry time has been reached, subsequent requests may get sent to a different origin server. Valid values are between 1800 and 604800.

steering_policy str

Determine which method the load balancer uses to determine the fastest route to your origin. Valid values are: "off", "geo", "dynamic_latency", "random" or "". Default is "".

ttl int

Time to live (TTL) of this load balancer’s DNS name. Conflicts with proxied - this cannot be set for proxied load balancers. Default is 30.

zone_id str

The zone ID to add the load balancer to.

Supporting Types

LoadBalancerPopPool

PoolIds List<string>

A list of pool IDs in failover priority to use for traffic reaching the given PoP.

Pop string

A 3-letter code for the Point-of-Presence. Allowed values can be found in the list of datacenters on the status page. Multiple entries should not be specified with the same PoP.

PoolIds []string

A list of pool IDs in failover priority to use for traffic reaching the given PoP.

Pop string

A 3-letter code for the Point-of-Presence. Allowed values can be found in the list of datacenters on the status page. Multiple entries should not be specified with the same PoP.

poolIds string[]

A list of pool IDs in failover priority to use for traffic reaching the given PoP.

pop string

A 3-letter code for the Point-of-Presence. Allowed values can be found in the list of datacenters on the status page. Multiple entries should not be specified with the same PoP.

pool_ids Sequence[str]

A list of pool IDs in failover priority to use for traffic reaching the given PoP.

pop str

A 3-letter code for the Point-of-Presence. Allowed values can be found in the list of datacenters on the status page. Multiple entries should not be specified with the same PoP.

LoadBalancerRegionPool

PoolIds List<string>

A list of pool IDs in failover priority to use for traffic reaching the given PoP.

Region string

A region code which must be in the list defined here. Multiple entries should not be specified with the same region.

PoolIds []string

A list of pool IDs in failover priority to use for traffic reaching the given PoP.

Region string

A region code which must be in the list defined here. Multiple entries should not be specified with the same region.

poolIds string[]

A list of pool IDs in failover priority to use for traffic reaching the given PoP.

region string

A region code which must be in the list defined here. Multiple entries should not be specified with the same region.

pool_ids Sequence[str]

A list of pool IDs in failover priority to use for traffic reaching the given PoP.

region str

A region code which must be in the list defined here. Multiple entries should not be specified with the same region.

Package Details

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