cloudflare.LoadBalancer
Explore with Pulumi AI
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
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleLoadBalancerPool = new cloudflare.LoadBalancerPool("example", {
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 example = new cloudflare.LoadBalancer("example", {
zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
name: "example-load-balancer.example.com",
fallbackPoolId: exampleLoadBalancerPool.id,
defaultPoolIds: [exampleLoadBalancerPool.id],
description: "example load balancer using geo-balancing",
proxied: true,
steeringPolicy: "geo",
popPools: [{
pop: "LAX",
poolIds: [exampleLoadBalancerPool.id],
}],
countryPools: [{
country: "US",
poolIds: [exampleLoadBalancerPool.id],
}],
regionPools: [{
region: "WNAM",
poolIds: [exampleLoadBalancerPool.id],
}],
rules: [{
name: "example rule",
condition: "http.request.uri.path contains \"testing\"",
fixedResponse: {
messageBody: "hello",
statusCode: 200,
contentType: "html",
location: "www.example.com",
},
}],
});
import pulumi
import pulumi_cloudflare as cloudflare
example_load_balancer_pool = cloudflare.LoadBalancerPool("example",
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.
example = cloudflare.LoadBalancer("example",
zone_id="0da42c8d2132a9ddaf714f9e7c920711",
name="example-load-balancer.example.com",
fallback_pool_id=example_load_balancer_pool.id,
default_pool_ids=[example_load_balancer_pool.id],
description="example load balancer using geo-balancing",
proxied=True,
steering_policy="geo",
pop_pools=[{
"pop": "LAX",
"pool_ids": [example_load_balancer_pool.id],
}],
country_pools=[{
"country": "US",
"pool_ids": [example_load_balancer_pool.id],
}],
region_pools=[{
"region": "WNAM",
"pool_ids": [example_load_balancer_pool.id],
}],
rules=[{
"name": "example rule",
"condition": "http.request.uri.path contains \"testing\"",
"fixed_response": {
"message_body": "hello",
"status_code": 200,
"content_type": "html",
"location": "www.example.com",
},
}])
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleLoadBalancerPool, err := cloudflare.NewLoadBalancerPool(ctx, "example", &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
}
// 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.
_, err = cloudflare.NewLoadBalancer(ctx, "example", &cloudflare.LoadBalancerArgs{
ZoneId: pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
Name: pulumi.String("example-load-balancer.example.com"),
FallbackPoolId: exampleLoadBalancerPool.ID(),
DefaultPoolIds: pulumi.StringArray{
exampleLoadBalancerPool.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{
exampleLoadBalancerPool.ID(),
},
},
},
CountryPools: cloudflare.LoadBalancerCountryPoolArray{
&cloudflare.LoadBalancerCountryPoolArgs{
Country: pulumi.String("US"),
PoolIds: pulumi.StringArray{
exampleLoadBalancerPool.ID(),
},
},
},
RegionPools: cloudflare.LoadBalancerRegionPoolArray{
&cloudflare.LoadBalancerRegionPoolArgs{
Region: pulumi.String("WNAM"),
PoolIds: pulumi.StringArray{
exampleLoadBalancerPool.ID(),
},
},
},
Rules: cloudflare.LoadBalancerRuleArray{
&cloudflare.LoadBalancerRuleArgs{
Name: pulumi.String("example rule"),
Condition: pulumi.String("http.request.uri.path contains \"testing\""),
FixedResponse: &cloudflare.LoadBalancerRuleFixedResponseArgs{
MessageBody: pulumi.String("hello"),
StatusCode: pulumi.Int(200),
ContentType: pulumi.String("html"),
Location: pulumi.String("www.example.com"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var exampleLoadBalancerPool = new Cloudflare.LoadBalancerPool("example", new()
{
Name = "example-lb-pool",
Origins = new[]
{
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 example = new Cloudflare.LoadBalancer("example", new()
{
ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
Name = "example-load-balancer.example.com",
FallbackPoolId = exampleLoadBalancerPool.Id,
DefaultPoolIds = new[]
{
exampleLoadBalancerPool.Id,
},
Description = "example load balancer using geo-balancing",
Proxied = true,
SteeringPolicy = "geo",
PopPools = new[]
{
new Cloudflare.Inputs.LoadBalancerPopPoolArgs
{
Pop = "LAX",
PoolIds = new[]
{
exampleLoadBalancerPool.Id,
},
},
},
CountryPools = new[]
{
new Cloudflare.Inputs.LoadBalancerCountryPoolArgs
{
Country = "US",
PoolIds = new[]
{
exampleLoadBalancerPool.Id,
},
},
},
RegionPools = new[]
{
new Cloudflare.Inputs.LoadBalancerRegionPoolArgs
{
Region = "WNAM",
PoolIds = new[]
{
exampleLoadBalancerPool.Id,
},
},
},
Rules = new[]
{
new Cloudflare.Inputs.LoadBalancerRuleArgs
{
Name = "example rule",
Condition = "http.request.uri.path contains \"testing\"",
FixedResponse = new Cloudflare.Inputs.LoadBalancerRuleFixedResponseArgs
{
MessageBody = "hello",
StatusCode = 200,
ContentType = "html",
Location = "www.example.com",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.LoadBalancerPool;
import com.pulumi.cloudflare.LoadBalancerPoolArgs;
import com.pulumi.cloudflare.inputs.LoadBalancerPoolOriginArgs;
import com.pulumi.cloudflare.LoadBalancer;
import com.pulumi.cloudflare.LoadBalancerArgs;
import com.pulumi.cloudflare.inputs.LoadBalancerPopPoolArgs;
import com.pulumi.cloudflare.inputs.LoadBalancerCountryPoolArgs;
import com.pulumi.cloudflare.inputs.LoadBalancerRegionPoolArgs;
import com.pulumi.cloudflare.inputs.LoadBalancerRuleArgs;
import com.pulumi.cloudflare.inputs.LoadBalancerRuleFixedResponseArgs;
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 exampleLoadBalancerPool = new LoadBalancerPool("exampleLoadBalancerPool", LoadBalancerPoolArgs.builder()
.name("example-lb-pool")
.origins(LoadBalancerPoolOriginArgs.builder()
.name("example-1")
.address("192.0.2.1")
.enabled(false)
.build())
.build());
// 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 example = new LoadBalancer("example", LoadBalancerArgs.builder()
.zoneId("0da42c8d2132a9ddaf714f9e7c920711")
.name("example-load-balancer.example.com")
.fallbackPoolId(exampleLoadBalancerPool.id())
.defaultPoolIds(exampleLoadBalancerPool.id())
.description("example load balancer using geo-balancing")
.proxied(true)
.steeringPolicy("geo")
.popPools(LoadBalancerPopPoolArgs.builder()
.pop("LAX")
.poolIds(exampleLoadBalancerPool.id())
.build())
.countryPools(LoadBalancerCountryPoolArgs.builder()
.country("US")
.poolIds(exampleLoadBalancerPool.id())
.build())
.regionPools(LoadBalancerRegionPoolArgs.builder()
.region("WNAM")
.poolIds(exampleLoadBalancerPool.id())
.build())
.rules(LoadBalancerRuleArgs.builder()
.name("example rule")
.condition("http.request.uri.path contains \"testing\"")
.fixedResponse(LoadBalancerRuleFixedResponseArgs.builder()
.messageBody("hello")
.statusCode(200)
.contentType("html")
.location("www.example.com")
.build())
.build())
.build());
}
}
resources:
# 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.
example:
type: cloudflare:LoadBalancer
properties:
zoneId: 0da42c8d2132a9ddaf714f9e7c920711
name: example-load-balancer.example.com
fallbackPoolId: ${exampleLoadBalancerPool.id}
defaultPoolIds:
- ${exampleLoadBalancerPool.id}
description: example load balancer using geo-balancing
proxied: true
steeringPolicy: geo
popPools:
- pop: LAX
poolIds:
- ${exampleLoadBalancerPool.id}
countryPools:
- country: US
poolIds:
- ${exampleLoadBalancerPool.id}
regionPools:
- region: WNAM
poolIds:
- ${exampleLoadBalancerPool.id}
rules:
- name: example rule
condition: http.request.uri.path contains "testing"
fixedResponse:
messageBody: hello
statusCode: 200
contentType: html
location: www.example.com
exampleLoadBalancerPool:
type: cloudflare:LoadBalancerPool
name: example
properties:
name: example-lb-pool
origins:
- name: example-1
address: 192.0.2.1
enabled: false
Create LoadBalancer Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LoadBalancer(name: string, args: LoadBalancerArgs, opts?: CustomResourceOptions);
@overload
def LoadBalancer(resource_name: str,
args: LoadBalancerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def LoadBalancer(resource_name: str,
opts: Optional[ResourceOptions] = None,
fallback_pool_id: Optional[str] = None,
zone_id: Optional[str] = None,
default_pool_ids: Optional[Sequence[str]] = None,
name: Optional[str] = None,
pop_pools: Optional[Sequence[LoadBalancerPopPoolArgs]] = None,
region_pools: Optional[Sequence[LoadBalancerRegionPoolArgs]] = None,
location_strategies: Optional[Sequence[LoadBalancerLocationStrategyArgs]] = None,
description: Optional[str] = None,
adaptive_routings: Optional[Sequence[LoadBalancerAdaptiveRoutingArgs]] = None,
proxied: Optional[bool] = None,
random_steerings: Optional[Sequence[LoadBalancerRandomSteeringArgs]] = None,
enabled: Optional[bool] = None,
rules: Optional[Sequence[LoadBalancerRuleArgs]] = None,
session_affinity: Optional[str] = None,
session_affinity_attributes: Optional[Sequence[LoadBalancerSessionAffinityAttributeArgs]] = None,
session_affinity_ttl: Optional[int] = None,
steering_policy: Optional[str] = None,
ttl: Optional[int] = None,
country_pools: Optional[Sequence[LoadBalancerCountryPoolArgs]] = None)
func NewLoadBalancer(ctx *Context, name string, args LoadBalancerArgs, opts ...ResourceOption) (*LoadBalancer, error)
public LoadBalancer(string name, LoadBalancerArgs args, CustomResourceOptions? opts = null)
public LoadBalancer(String name, LoadBalancerArgs args)
public LoadBalancer(String name, LoadBalancerArgs args, CustomResourceOptions options)
type: cloudflare:LoadBalancer
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- 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.
- args LoadBalancerArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control 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.
- name String
- The unique name of the resource.
- args LoadBalancerArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var loadBalancerResource = new Cloudflare.LoadBalancer("loadBalancerResource", new()
{
FallbackPoolId = "string",
ZoneId = "string",
DefaultPoolIds = new[]
{
"string",
},
Name = "string",
PopPools = new[]
{
new Cloudflare.Inputs.LoadBalancerPopPoolArgs
{
PoolIds = new[]
{
"string",
},
Pop = "string",
},
},
RegionPools = new[]
{
new Cloudflare.Inputs.LoadBalancerRegionPoolArgs
{
PoolIds = new[]
{
"string",
},
Region = "string",
},
},
LocationStrategies = new[]
{
new Cloudflare.Inputs.LoadBalancerLocationStrategyArgs
{
Mode = "string",
PreferEcs = "string",
},
},
Description = "string",
AdaptiveRoutings = new[]
{
new Cloudflare.Inputs.LoadBalancerAdaptiveRoutingArgs
{
FailoverAcrossPools = false,
},
},
Proxied = false,
RandomSteerings = new[]
{
new Cloudflare.Inputs.LoadBalancerRandomSteeringArgs
{
DefaultWeight = 0,
PoolWeights =
{
{ "string", 0 },
},
},
},
Enabled = false,
Rules = new[]
{
new Cloudflare.Inputs.LoadBalancerRuleArgs
{
Name = "string",
Condition = "string",
Disabled = false,
FixedResponse = new Cloudflare.Inputs.LoadBalancerRuleFixedResponseArgs
{
ContentType = "string",
Location = "string",
MessageBody = "string",
StatusCode = 0,
},
Overrides = new[]
{
new Cloudflare.Inputs.LoadBalancerRuleOverrideArgs
{
AdaptiveRoutings = new[]
{
new Cloudflare.Inputs.LoadBalancerRuleOverrideAdaptiveRoutingArgs
{
FailoverAcrossPools = false,
},
},
CountryPools = new[]
{
new Cloudflare.Inputs.LoadBalancerRuleOverrideCountryPoolArgs
{
Country = "string",
PoolIds = new[]
{
"string",
},
},
},
DefaultPools = new[]
{
"string",
},
FallbackPool = "string",
LocationStrategies = new[]
{
new Cloudflare.Inputs.LoadBalancerRuleOverrideLocationStrategyArgs
{
Mode = "string",
PreferEcs = "string",
},
},
PopPools = new[]
{
new Cloudflare.Inputs.LoadBalancerRuleOverridePopPoolArgs
{
PoolIds = new[]
{
"string",
},
Pop = "string",
},
},
RandomSteerings = new[]
{
new Cloudflare.Inputs.LoadBalancerRuleOverrideRandomSteeringArgs
{
DefaultWeight = 0,
PoolWeights =
{
{ "string", 0 },
},
},
},
RegionPools = new[]
{
new Cloudflare.Inputs.LoadBalancerRuleOverrideRegionPoolArgs
{
PoolIds = new[]
{
"string",
},
Region = "string",
},
},
SessionAffinity = "string",
SessionAffinityAttributes = new[]
{
new Cloudflare.Inputs.LoadBalancerRuleOverrideSessionAffinityAttributeArgs
{
Headers = new[]
{
"string",
},
RequireAllHeaders = false,
Samesite = "string",
Secure = "string",
ZeroDowntimeFailover = "string",
},
},
SessionAffinityTtl = 0,
SteeringPolicy = "string",
Ttl = 0,
},
},
Priority = 0,
Terminates = false,
},
},
SessionAffinity = "string",
SessionAffinityAttributes = new[]
{
new Cloudflare.Inputs.LoadBalancerSessionAffinityAttributeArgs
{
DrainDuration = 0,
Headers = new[]
{
"string",
},
RequireAllHeaders = false,
Samesite = "string",
Secure = "string",
ZeroDowntimeFailover = "string",
},
},
SessionAffinityTtl = 0,
SteeringPolicy = "string",
Ttl = 0,
CountryPools = new[]
{
new Cloudflare.Inputs.LoadBalancerCountryPoolArgs
{
Country = "string",
PoolIds = new[]
{
"string",
},
},
},
});
example, err := cloudflare.NewLoadBalancer(ctx, "loadBalancerResource", &cloudflare.LoadBalancerArgs{
FallbackPoolId: pulumi.String("string"),
ZoneId: pulumi.String("string"),
DefaultPoolIds: pulumi.StringArray{
pulumi.String("string"),
},
Name: pulumi.String("string"),
PopPools: cloudflare.LoadBalancerPopPoolArray{
&cloudflare.LoadBalancerPopPoolArgs{
PoolIds: pulumi.StringArray{
pulumi.String("string"),
},
Pop: pulumi.String("string"),
},
},
RegionPools: cloudflare.LoadBalancerRegionPoolArray{
&cloudflare.LoadBalancerRegionPoolArgs{
PoolIds: pulumi.StringArray{
pulumi.String("string"),
},
Region: pulumi.String("string"),
},
},
LocationStrategies: cloudflare.LoadBalancerLocationStrategyArray{
&cloudflare.LoadBalancerLocationStrategyArgs{
Mode: pulumi.String("string"),
PreferEcs: pulumi.String("string"),
},
},
Description: pulumi.String("string"),
AdaptiveRoutings: cloudflare.LoadBalancerAdaptiveRoutingArray{
&cloudflare.LoadBalancerAdaptiveRoutingArgs{
FailoverAcrossPools: pulumi.Bool(false),
},
},
Proxied: pulumi.Bool(false),
RandomSteerings: cloudflare.LoadBalancerRandomSteeringArray{
&cloudflare.LoadBalancerRandomSteeringArgs{
DefaultWeight: pulumi.Float64(0),
PoolWeights: pulumi.Float64Map{
"string": pulumi.Float64(0),
},
},
},
Enabled: pulumi.Bool(false),
Rules: cloudflare.LoadBalancerRuleArray{
&cloudflare.LoadBalancerRuleArgs{
Name: pulumi.String("string"),
Condition: pulumi.String("string"),
Disabled: pulumi.Bool(false),
FixedResponse: &cloudflare.LoadBalancerRuleFixedResponseArgs{
ContentType: pulumi.String("string"),
Location: pulumi.String("string"),
MessageBody: pulumi.String("string"),
StatusCode: pulumi.Int(0),
},
Overrides: cloudflare.LoadBalancerRuleOverrideArray{
&cloudflare.LoadBalancerRuleOverrideArgs{
AdaptiveRoutings: cloudflare.LoadBalancerRuleOverrideAdaptiveRoutingArray{
&cloudflare.LoadBalancerRuleOverrideAdaptiveRoutingArgs{
FailoverAcrossPools: pulumi.Bool(false),
},
},
CountryPools: cloudflare.LoadBalancerRuleOverrideCountryPoolArray{
&cloudflare.LoadBalancerRuleOverrideCountryPoolArgs{
Country: pulumi.String("string"),
PoolIds: pulumi.StringArray{
pulumi.String("string"),
},
},
},
DefaultPools: pulumi.StringArray{
pulumi.String("string"),
},
FallbackPool: pulumi.String("string"),
LocationStrategies: cloudflare.LoadBalancerRuleOverrideLocationStrategyArray{
&cloudflare.LoadBalancerRuleOverrideLocationStrategyArgs{
Mode: pulumi.String("string"),
PreferEcs: pulumi.String("string"),
},
},
PopPools: cloudflare.LoadBalancerRuleOverridePopPoolArray{
&cloudflare.LoadBalancerRuleOverridePopPoolArgs{
PoolIds: pulumi.StringArray{
pulumi.String("string"),
},
Pop: pulumi.String("string"),
},
},
RandomSteerings: cloudflare.LoadBalancerRuleOverrideRandomSteeringArray{
&cloudflare.LoadBalancerRuleOverrideRandomSteeringArgs{
DefaultWeight: pulumi.Float64(0),
PoolWeights: pulumi.Float64Map{
"string": pulumi.Float64(0),
},
},
},
RegionPools: cloudflare.LoadBalancerRuleOverrideRegionPoolArray{
&cloudflare.LoadBalancerRuleOverrideRegionPoolArgs{
PoolIds: pulumi.StringArray{
pulumi.String("string"),
},
Region: pulumi.String("string"),
},
},
SessionAffinity: pulumi.String("string"),
SessionAffinityAttributes: cloudflare.LoadBalancerRuleOverrideSessionAffinityAttributeArray{
&cloudflare.LoadBalancerRuleOverrideSessionAffinityAttributeArgs{
Headers: pulumi.StringArray{
pulumi.String("string"),
},
RequireAllHeaders: pulumi.Bool(false),
Samesite: pulumi.String("string"),
Secure: pulumi.String("string"),
ZeroDowntimeFailover: pulumi.String("string"),
},
},
SessionAffinityTtl: pulumi.Int(0),
SteeringPolicy: pulumi.String("string"),
Ttl: pulumi.Int(0),
},
},
Priority: pulumi.Int(0),
Terminates: pulumi.Bool(false),
},
},
SessionAffinity: pulumi.String("string"),
SessionAffinityAttributes: cloudflare.LoadBalancerSessionAffinityAttributeArray{
&cloudflare.LoadBalancerSessionAffinityAttributeArgs{
DrainDuration: pulumi.Int(0),
Headers: pulumi.StringArray{
pulumi.String("string"),
},
RequireAllHeaders: pulumi.Bool(false),
Samesite: pulumi.String("string"),
Secure: pulumi.String("string"),
ZeroDowntimeFailover: pulumi.String("string"),
},
},
SessionAffinityTtl: pulumi.Int(0),
SteeringPolicy: pulumi.String("string"),
Ttl: pulumi.Int(0),
CountryPools: cloudflare.LoadBalancerCountryPoolArray{
&cloudflare.LoadBalancerCountryPoolArgs{
Country: pulumi.String("string"),
PoolIds: pulumi.StringArray{
pulumi.String("string"),
},
},
},
})
var loadBalancerResource = new LoadBalancer("loadBalancerResource", LoadBalancerArgs.builder()
.fallbackPoolId("string")
.zoneId("string")
.defaultPoolIds("string")
.name("string")
.popPools(LoadBalancerPopPoolArgs.builder()
.poolIds("string")
.pop("string")
.build())
.regionPools(LoadBalancerRegionPoolArgs.builder()
.poolIds("string")
.region("string")
.build())
.locationStrategies(LoadBalancerLocationStrategyArgs.builder()
.mode("string")
.preferEcs("string")
.build())
.description("string")
.adaptiveRoutings(LoadBalancerAdaptiveRoutingArgs.builder()
.failoverAcrossPools(false)
.build())
.proxied(false)
.randomSteerings(LoadBalancerRandomSteeringArgs.builder()
.defaultWeight(0)
.poolWeights(Map.of("string", 0))
.build())
.enabled(false)
.rules(LoadBalancerRuleArgs.builder()
.name("string")
.condition("string")
.disabled(false)
.fixedResponse(LoadBalancerRuleFixedResponseArgs.builder()
.contentType("string")
.location("string")
.messageBody("string")
.statusCode(0)
.build())
.overrides(LoadBalancerRuleOverrideArgs.builder()
.adaptiveRoutings(LoadBalancerRuleOverrideAdaptiveRoutingArgs.builder()
.failoverAcrossPools(false)
.build())
.countryPools(LoadBalancerRuleOverrideCountryPoolArgs.builder()
.country("string")
.poolIds("string")
.build())
.defaultPools("string")
.fallbackPool("string")
.locationStrategies(LoadBalancerRuleOverrideLocationStrategyArgs.builder()
.mode("string")
.preferEcs("string")
.build())
.popPools(LoadBalancerRuleOverridePopPoolArgs.builder()
.poolIds("string")
.pop("string")
.build())
.randomSteerings(LoadBalancerRuleOverrideRandomSteeringArgs.builder()
.defaultWeight(0)
.poolWeights(Map.of("string", 0))
.build())
.regionPools(LoadBalancerRuleOverrideRegionPoolArgs.builder()
.poolIds("string")
.region("string")
.build())
.sessionAffinity("string")
.sessionAffinityAttributes(LoadBalancerRuleOverrideSessionAffinityAttributeArgs.builder()
.headers("string")
.requireAllHeaders(false)
.samesite("string")
.secure("string")
.zeroDowntimeFailover("string")
.build())
.sessionAffinityTtl(0)
.steeringPolicy("string")
.ttl(0)
.build())
.priority(0)
.terminates(false)
.build())
.sessionAffinity("string")
.sessionAffinityAttributes(LoadBalancerSessionAffinityAttributeArgs.builder()
.drainDuration(0)
.headers("string")
.requireAllHeaders(false)
.samesite("string")
.secure("string")
.zeroDowntimeFailover("string")
.build())
.sessionAffinityTtl(0)
.steeringPolicy("string")
.ttl(0)
.countryPools(LoadBalancerCountryPoolArgs.builder()
.country("string")
.poolIds("string")
.build())
.build());
load_balancer_resource = cloudflare.LoadBalancer("loadBalancerResource",
fallback_pool_id="string",
zone_id="string",
default_pool_ids=["string"],
name="string",
pop_pools=[cloudflare.LoadBalancerPopPoolArgs(
pool_ids=["string"],
pop="string",
)],
region_pools=[cloudflare.LoadBalancerRegionPoolArgs(
pool_ids=["string"],
region="string",
)],
location_strategies=[cloudflare.LoadBalancerLocationStrategyArgs(
mode="string",
prefer_ecs="string",
)],
description="string",
adaptive_routings=[cloudflare.LoadBalancerAdaptiveRoutingArgs(
failover_across_pools=False,
)],
proxied=False,
random_steerings=[cloudflare.LoadBalancerRandomSteeringArgs(
default_weight=0,
pool_weights={
"string": 0,
},
)],
enabled=False,
rules=[cloudflare.LoadBalancerRuleArgs(
name="string",
condition="string",
disabled=False,
fixed_response=cloudflare.LoadBalancerRuleFixedResponseArgs(
content_type="string",
location="string",
message_body="string",
status_code=0,
),
overrides=[cloudflare.LoadBalancerRuleOverrideArgs(
adaptive_routings=[cloudflare.LoadBalancerRuleOverrideAdaptiveRoutingArgs(
failover_across_pools=False,
)],
country_pools=[cloudflare.LoadBalancerRuleOverrideCountryPoolArgs(
country="string",
pool_ids=["string"],
)],
default_pools=["string"],
fallback_pool="string",
location_strategies=[cloudflare.LoadBalancerRuleOverrideLocationStrategyArgs(
mode="string",
prefer_ecs="string",
)],
pop_pools=[cloudflare.LoadBalancerRuleOverridePopPoolArgs(
pool_ids=["string"],
pop="string",
)],
random_steerings=[cloudflare.LoadBalancerRuleOverrideRandomSteeringArgs(
default_weight=0,
pool_weights={
"string": 0,
},
)],
region_pools=[cloudflare.LoadBalancerRuleOverrideRegionPoolArgs(
pool_ids=["string"],
region="string",
)],
session_affinity="string",
session_affinity_attributes=[cloudflare.LoadBalancerRuleOverrideSessionAffinityAttributeArgs(
headers=["string"],
require_all_headers=False,
samesite="string",
secure="string",
zero_downtime_failover="string",
)],
session_affinity_ttl=0,
steering_policy="string",
ttl=0,
)],
priority=0,
terminates=False,
)],
session_affinity="string",
session_affinity_attributes=[cloudflare.LoadBalancerSessionAffinityAttributeArgs(
drain_duration=0,
headers=["string"],
require_all_headers=False,
samesite="string",
secure="string",
zero_downtime_failover="string",
)],
session_affinity_ttl=0,
steering_policy="string",
ttl=0,
country_pools=[cloudflare.LoadBalancerCountryPoolArgs(
country="string",
pool_ids=["string"],
)])
const loadBalancerResource = new cloudflare.LoadBalancer("loadBalancerResource", {
fallbackPoolId: "string",
zoneId: "string",
defaultPoolIds: ["string"],
name: "string",
popPools: [{
poolIds: ["string"],
pop: "string",
}],
regionPools: [{
poolIds: ["string"],
region: "string",
}],
locationStrategies: [{
mode: "string",
preferEcs: "string",
}],
description: "string",
adaptiveRoutings: [{
failoverAcrossPools: false,
}],
proxied: false,
randomSteerings: [{
defaultWeight: 0,
poolWeights: {
string: 0,
},
}],
enabled: false,
rules: [{
name: "string",
condition: "string",
disabled: false,
fixedResponse: {
contentType: "string",
location: "string",
messageBody: "string",
statusCode: 0,
},
overrides: [{
adaptiveRoutings: [{
failoverAcrossPools: false,
}],
countryPools: [{
country: "string",
poolIds: ["string"],
}],
defaultPools: ["string"],
fallbackPool: "string",
locationStrategies: [{
mode: "string",
preferEcs: "string",
}],
popPools: [{
poolIds: ["string"],
pop: "string",
}],
randomSteerings: [{
defaultWeight: 0,
poolWeights: {
string: 0,
},
}],
regionPools: [{
poolIds: ["string"],
region: "string",
}],
sessionAffinity: "string",
sessionAffinityAttributes: [{
headers: ["string"],
requireAllHeaders: false,
samesite: "string",
secure: "string",
zeroDowntimeFailover: "string",
}],
sessionAffinityTtl: 0,
steeringPolicy: "string",
ttl: 0,
}],
priority: 0,
terminates: false,
}],
sessionAffinity: "string",
sessionAffinityAttributes: [{
drainDuration: 0,
headers: ["string"],
requireAllHeaders: false,
samesite: "string",
secure: "string",
zeroDowntimeFailover: "string",
}],
sessionAffinityTtl: 0,
steeringPolicy: "string",
ttl: 0,
countryPools: [{
country: "string",
poolIds: ["string"],
}],
});
type: cloudflare:LoadBalancer
properties:
adaptiveRoutings:
- failoverAcrossPools: false
countryPools:
- country: string
poolIds:
- string
defaultPoolIds:
- string
description: string
enabled: false
fallbackPoolId: string
locationStrategies:
- mode: string
preferEcs: string
name: string
popPools:
- poolIds:
- string
pop: string
proxied: false
randomSteerings:
- defaultWeight: 0
poolWeights:
string: 0
regionPools:
- poolIds:
- string
region: string
rules:
- condition: string
disabled: false
fixedResponse:
contentType: string
location: string
messageBody: string
statusCode: 0
name: string
overrides:
- adaptiveRoutings:
- failoverAcrossPools: false
countryPools:
- country: string
poolIds:
- string
defaultPools:
- string
fallbackPool: string
locationStrategies:
- mode: string
preferEcs: string
popPools:
- poolIds:
- string
pop: string
randomSteerings:
- defaultWeight: 0
poolWeights:
string: 0
regionPools:
- poolIds:
- string
region: string
sessionAffinity: string
sessionAffinityAttributes:
- headers:
- string
requireAllHeaders: false
samesite: string
secure: string
zeroDowntimeFailover: string
sessionAffinityTtl: 0
steeringPolicy: string
ttl: 0
priority: 0
terminates: false
sessionAffinity: string
sessionAffinityAttributes:
- drainDuration: 0
headers:
- string
requireAllHeaders: false
samesite: string
secure: string
zeroDowntimeFailover: string
sessionAffinityTtl: 0
steeringPolicy: string
ttl: 0
zoneId: string
LoadBalancer Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The LoadBalancer resource accepts the following input properties:
- Default
Pool List<string>Ids - A list of pool IDs ordered by their failover priority. Used whenever
pop_pools
/country_pools
/region_pools
are not defined. - Fallback
Pool stringId - The pool ID to use when all other pools are detected as unhealthy.
- Name string
- The DNS hostname to associate with your load balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the load balancer will take precedence and the DNS record will not be used.
- Zone
Id string - The zone ID to add the load balancer to. Modifying this attribute will force creation of a new resource.
- Adaptive
Routings List<LoadBalancer Adaptive Routing> - Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests.
- Country
Pools List<LoadBalancer Country Pool> - A set containing mappings of country codes to a list of pool IDs (ordered by their failover priority) for the given country.
- Description string
- Free text description.
- Enabled bool
- Enable or disable the load balancer. Defaults to
true
. - Location
Strategies List<LoadBalancer Location Strategy> - Controls location-based steering for non-proxied requests.
- Pop
Pools List<LoadBalancer Pop Pool> - 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.
- Proxied bool
- Whether the hostname gets Cloudflare's origin protection. Defaults to
false
. Conflicts withttl
. - Random
Steerings List<LoadBalancer Random Steering> - Configures pool weights. When
steering_policy="random"
, a random pool is selected with probability proportional to pool weights. Whensteering_policy="least_outstanding_requests"
, pool weights are used to scale each pool's outstanding requests. Whensteering_policy="least_connections"
, pool weights are used to scale each pool's open connections. - Region
Pools List<LoadBalancer Region Pool> - A set containing mappings of region codes to a list of pool IDs (ordered by their failover priority) for the given region.
- Rules
List<Load
Balancer Rule> - A list of rules for this load balancer to execute.
- Session
Affinity string - Specifies the type of session affinity the load balancer should use unless specified as
none
or""
(default). With valuecookie
, on the first request to a proxied load balancer, a cookie is generated, encoding information of which origin the request will be forwarded to. Subsequent requests, by the same client to the same load balancer, will be sent to the origin server the cookie encodes, for the duration of the cookie and as long as the origin server remains healthy. If the cookie has expired or the origin server is unhealthy then a new origin server is calculated and used. Valueip_cookie
behaves the same ascookie
except the initial origin selection is stable and based on the client's IP address. Available values:""
,none
,cookie
,ip_cookie
,header
. Defaults tonone
. - Session
Affinity List<LoadAttributes Balancer Session Affinity Attribute> - Configure attributes for session affinity.
- Session
Affinity intTtl - Time, in seconds, until this load balancer's session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of
82800
(23 hours) will be used unlesssession_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 between1800
and604800
. - Steering
Policy string - The method the load balancer uses to determine the route to your origin. Value
off
usesdefault_pool_ids
. Valuegeo
usespop_pools
/country_pools
/region_pools
. For non-proxied requests, thecountry
forcountry_pools
is determined bylocation_strategy
. Valuerandom
selects a pool randomly. Valuedynamic_latency
uses round trip time to select the closest pool indefault_pool_ids
(requires pool health checks). Valueproximity
uses the pools' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined bylocation_strategy
for non-proxied requests. Valueleast_outstanding_requests
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others. Valueleast_connections
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections. Value""
maps togeo
if you usepop_pools
/country_pools
/region_pools
otherwiseoff
. Available values:off
,geo
,dynamic_latency
,random
,proximity
,least_outstanding_requests
,least_connections
,""
Defaults to""
. - Ttl int
- Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This cannot be set for proxied load balancers. Defaults to
30
. Conflicts withproxied
.
- Default
Pool []stringIds - A list of pool IDs ordered by their failover priority. Used whenever
pop_pools
/country_pools
/region_pools
are not defined. - Fallback
Pool stringId - The pool ID to use when all other pools are detected as unhealthy.
- Name string
- The DNS hostname to associate with your load balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the load balancer will take precedence and the DNS record will not be used.
- Zone
Id string - The zone ID to add the load balancer to. Modifying this attribute will force creation of a new resource.
- Adaptive
Routings []LoadBalancer Adaptive Routing Args - Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests.
- Country
Pools []LoadBalancer Country Pool Args - A set containing mappings of country codes to a list of pool IDs (ordered by their failover priority) for the given country.
- Description string
- Free text description.
- Enabled bool
- Enable or disable the load balancer. Defaults to
true
. - Location
Strategies []LoadBalancer Location Strategy Args - Controls location-based steering for non-proxied requests.
- Pop
Pools []LoadBalancer Pop Pool Args - 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.
- Proxied bool
- Whether the hostname gets Cloudflare's origin protection. Defaults to
false
. Conflicts withttl
. - Random
Steerings []LoadBalancer Random Steering Args - Configures pool weights. When
steering_policy="random"
, a random pool is selected with probability proportional to pool weights. Whensteering_policy="least_outstanding_requests"
, pool weights are used to scale each pool's outstanding requests. Whensteering_policy="least_connections"
, pool weights are used to scale each pool's open connections. - Region
Pools []LoadBalancer Region Pool Args - A set containing mappings of region codes to a list of pool IDs (ordered by their failover priority) for the given region.
- Rules
[]Load
Balancer Rule Args - A list of rules for this load balancer to execute.
- Session
Affinity string - Specifies the type of session affinity the load balancer should use unless specified as
none
or""
(default). With valuecookie
, on the first request to a proxied load balancer, a cookie is generated, encoding information of which origin the request will be forwarded to. Subsequent requests, by the same client to the same load balancer, will be sent to the origin server the cookie encodes, for the duration of the cookie and as long as the origin server remains healthy. If the cookie has expired or the origin server is unhealthy then a new origin server is calculated and used. Valueip_cookie
behaves the same ascookie
except the initial origin selection is stable and based on the client's IP address. Available values:""
,none
,cookie
,ip_cookie
,header
. Defaults tonone
. - Session
Affinity []LoadAttributes Balancer Session Affinity Attribute Args - Configure attributes for session affinity.
- Session
Affinity intTtl - Time, in seconds, until this load balancer's session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of
82800
(23 hours) will be used unlesssession_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 between1800
and604800
. - Steering
Policy string - The method the load balancer uses to determine the route to your origin. Value
off
usesdefault_pool_ids
. Valuegeo
usespop_pools
/country_pools
/region_pools
. For non-proxied requests, thecountry
forcountry_pools
is determined bylocation_strategy
. Valuerandom
selects a pool randomly. Valuedynamic_latency
uses round trip time to select the closest pool indefault_pool_ids
(requires pool health checks). Valueproximity
uses the pools' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined bylocation_strategy
for non-proxied requests. Valueleast_outstanding_requests
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others. Valueleast_connections
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections. Value""
maps togeo
if you usepop_pools
/country_pools
/region_pools
otherwiseoff
. Available values:off
,geo
,dynamic_latency
,random
,proximity
,least_outstanding_requests
,least_connections
,""
Defaults to""
. - Ttl int
- Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This cannot be set for proxied load balancers. Defaults to
30
. Conflicts withproxied
.
- default
Pool List<String>Ids - A list of pool IDs ordered by their failover priority. Used whenever
pop_pools
/country_pools
/region_pools
are not defined. - fallback
Pool StringId - The pool ID to use when all other pools are detected as unhealthy.
- name String
- The DNS hostname to associate with your load balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the load balancer will take precedence and the DNS record will not be used.
- zone
Id String - The zone ID to add the load balancer to. Modifying this attribute will force creation of a new resource.
- adaptive
Routings List<LoadBalancer Adaptive Routing> - Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests.
- country
Pools List<LoadBalancer Country Pool> - A set containing mappings of country codes to a list of pool IDs (ordered by their failover priority) for the given country.
- description String
- Free text description.
- enabled Boolean
- Enable or disable the load balancer. Defaults to
true
. - location
Strategies List<LoadBalancer Location Strategy> - Controls location-based steering for non-proxied requests.
- pop
Pools List<LoadBalancer Pop Pool> - 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.
- proxied Boolean
- Whether the hostname gets Cloudflare's origin protection. Defaults to
false
. Conflicts withttl
. - random
Steerings List<LoadBalancer Random Steering> - Configures pool weights. When
steering_policy="random"
, a random pool is selected with probability proportional to pool weights. Whensteering_policy="least_outstanding_requests"
, pool weights are used to scale each pool's outstanding requests. Whensteering_policy="least_connections"
, pool weights are used to scale each pool's open connections. - region
Pools List<LoadBalancer Region Pool> - A set containing mappings of region codes to a list of pool IDs (ordered by their failover priority) for the given region.
- rules
List<Load
Balancer Rule> - A list of rules for this load balancer to execute.
- session
Affinity String - Specifies the type of session affinity the load balancer should use unless specified as
none
or""
(default). With valuecookie
, on the first request to a proxied load balancer, a cookie is generated, encoding information of which origin the request will be forwarded to. Subsequent requests, by the same client to the same load balancer, will be sent to the origin server the cookie encodes, for the duration of the cookie and as long as the origin server remains healthy. If the cookie has expired or the origin server is unhealthy then a new origin server is calculated and used. Valueip_cookie
behaves the same ascookie
except the initial origin selection is stable and based on the client's IP address. Available values:""
,none
,cookie
,ip_cookie
,header
. Defaults tonone
. - session
Affinity List<LoadAttributes Balancer Session Affinity Attribute> - Configure attributes for session affinity.
- session
Affinity IntegerTtl - Time, in seconds, until this load balancer's session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of
82800
(23 hours) will be used unlesssession_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 between1800
and604800
. - steering
Policy String - The method the load balancer uses to determine the route to your origin. Value
off
usesdefault_pool_ids
. Valuegeo
usespop_pools
/country_pools
/region_pools
. For non-proxied requests, thecountry
forcountry_pools
is determined bylocation_strategy
. Valuerandom
selects a pool randomly. Valuedynamic_latency
uses round trip time to select the closest pool indefault_pool_ids
(requires pool health checks). Valueproximity
uses the pools' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined bylocation_strategy
for non-proxied requests. Valueleast_outstanding_requests
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others. Valueleast_connections
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections. Value""
maps togeo
if you usepop_pools
/country_pools
/region_pools
otherwiseoff
. Available values:off
,geo
,dynamic_latency
,random
,proximity
,least_outstanding_requests
,least_connections
,""
Defaults to""
. - ttl Integer
- Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This cannot be set for proxied load balancers. Defaults to
30
. Conflicts withproxied
.
- default
Pool string[]Ids - A list of pool IDs ordered by their failover priority. Used whenever
pop_pools
/country_pools
/region_pools
are not defined. - fallback
Pool stringId - The pool ID to use when all other pools are detected as unhealthy.
- name string
- The DNS hostname to associate with your load balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the load balancer will take precedence and the DNS record will not be used.
- zone
Id string - The zone ID to add the load balancer to. Modifying this attribute will force creation of a new resource.
- adaptive
Routings LoadBalancer Adaptive Routing[] - Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests.
- country
Pools LoadBalancer Country Pool[] - A set containing mappings of country codes to a list of pool IDs (ordered by their failover priority) for the given country.
- description string
- Free text description.
- enabled boolean
- Enable or disable the load balancer. Defaults to
true
. - location
Strategies LoadBalancer Location Strategy[] - Controls location-based steering for non-proxied requests.
- pop
Pools LoadBalancer Pop Pool[] - 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.
- proxied boolean
- Whether the hostname gets Cloudflare's origin protection. Defaults to
false
. Conflicts withttl
. - random
Steerings LoadBalancer Random Steering[] - Configures pool weights. When
steering_policy="random"
, a random pool is selected with probability proportional to pool weights. Whensteering_policy="least_outstanding_requests"
, pool weights are used to scale each pool's outstanding requests. Whensteering_policy="least_connections"
, pool weights are used to scale each pool's open connections. - region
Pools LoadBalancer Region Pool[] - A set containing mappings of region codes to a list of pool IDs (ordered by their failover priority) for the given region.
- rules
Load
Balancer Rule[] - A list of rules for this load balancer to execute.
- session
Affinity string - Specifies the type of session affinity the load balancer should use unless specified as
none
or""
(default). With valuecookie
, on the first request to a proxied load balancer, a cookie is generated, encoding information of which origin the request will be forwarded to. Subsequent requests, by the same client to the same load balancer, will be sent to the origin server the cookie encodes, for the duration of the cookie and as long as the origin server remains healthy. If the cookie has expired or the origin server is unhealthy then a new origin server is calculated and used. Valueip_cookie
behaves the same ascookie
except the initial origin selection is stable and based on the client's IP address. Available values:""
,none
,cookie
,ip_cookie
,header
. Defaults tonone
. - session
Affinity LoadAttributes Balancer Session Affinity Attribute[] - Configure attributes for session affinity.
- session
Affinity numberTtl - Time, in seconds, until this load balancer's session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of
82800
(23 hours) will be used unlesssession_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 between1800
and604800
. - steering
Policy string - The method the load balancer uses to determine the route to your origin. Value
off
usesdefault_pool_ids
. Valuegeo
usespop_pools
/country_pools
/region_pools
. For non-proxied requests, thecountry
forcountry_pools
is determined bylocation_strategy
. Valuerandom
selects a pool randomly. Valuedynamic_latency
uses round trip time to select the closest pool indefault_pool_ids
(requires pool health checks). Valueproximity
uses the pools' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined bylocation_strategy
for non-proxied requests. Valueleast_outstanding_requests
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others. Valueleast_connections
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections. Value""
maps togeo
if you usepop_pools
/country_pools
/region_pools
otherwiseoff
. Available values:off
,geo
,dynamic_latency
,random
,proximity
,least_outstanding_requests
,least_connections
,""
Defaults to""
. - ttl number
- Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This cannot be set for proxied load balancers. Defaults to
30
. Conflicts withproxied
.
- default_
pool_ Sequence[str]ids - A list of pool IDs ordered by their failover priority. Used whenever
pop_pools
/country_pools
/region_pools
are not defined. - fallback_
pool_ strid - The pool ID to use when all other pools are detected as unhealthy.
- name str
- The DNS hostname to associate with your load balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the load balancer will take precedence and the DNS record will not be used.
- zone_
id str - The zone ID to add the load balancer to. Modifying this attribute will force creation of a new resource.
- adaptive_
routings Sequence[LoadBalancer Adaptive Routing Args] - Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests.
- country_
pools Sequence[LoadBalancer Country Pool Args] - A set containing mappings of country codes to a list of pool IDs (ordered by their failover priority) for the given country.
- description str
- Free text description.
- enabled bool
- Enable or disable the load balancer. Defaults to
true
. - location_
strategies Sequence[LoadBalancer Location Strategy Args] - Controls location-based steering for non-proxied requests.
- pop_
pools Sequence[LoadBalancer Pop Pool Args] - 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.
- proxied bool
- Whether the hostname gets Cloudflare's origin protection. Defaults to
false
. Conflicts withttl
. - random_
steerings Sequence[LoadBalancer Random Steering Args] - Configures pool weights. When
steering_policy="random"
, a random pool is selected with probability proportional to pool weights. Whensteering_policy="least_outstanding_requests"
, pool weights are used to scale each pool's outstanding requests. Whensteering_policy="least_connections"
, pool weights are used to scale each pool's open connections. - region_
pools Sequence[LoadBalancer Region Pool Args] - A set containing mappings of region codes to a list of pool IDs (ordered by their failover priority) for the given region.
- rules
Sequence[Load
Balancer Rule Args] - A list of rules for this load balancer to execute.
- session_
affinity str - Specifies the type of session affinity the load balancer should use unless specified as
none
or""
(default). With valuecookie
, on the first request to a proxied load balancer, a cookie is generated, encoding information of which origin the request will be forwarded to. Subsequent requests, by the same client to the same load balancer, will be sent to the origin server the cookie encodes, for the duration of the cookie and as long as the origin server remains healthy. If the cookie has expired or the origin server is unhealthy then a new origin server is calculated and used. Valueip_cookie
behaves the same ascookie
except the initial origin selection is stable and based on the client's IP address. Available values:""
,none
,cookie
,ip_cookie
,header
. Defaults tonone
. - session_
affinity_ Sequence[Loadattributes Balancer Session Affinity Attribute Args] - Configure attributes for session affinity.
- session_
affinity_ intttl - Time, in seconds, until this load balancer's session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of
82800
(23 hours) will be used unlesssession_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 between1800
and604800
. - steering_
policy str - The method the load balancer uses to determine the route to your origin. Value
off
usesdefault_pool_ids
. Valuegeo
usespop_pools
/country_pools
/region_pools
. For non-proxied requests, thecountry
forcountry_pools
is determined bylocation_strategy
. Valuerandom
selects a pool randomly. Valuedynamic_latency
uses round trip time to select the closest pool indefault_pool_ids
(requires pool health checks). Valueproximity
uses the pools' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined bylocation_strategy
for non-proxied requests. Valueleast_outstanding_requests
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others. Valueleast_connections
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections. Value""
maps togeo
if you usepop_pools
/country_pools
/region_pools
otherwiseoff
. Available values:off
,geo
,dynamic_latency
,random
,proximity
,least_outstanding_requests
,least_connections
,""
Defaults to""
. - ttl int
- Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This cannot be set for proxied load balancers. Defaults to
30
. Conflicts withproxied
.
- default
Pool List<String>Ids - A list of pool IDs ordered by their failover priority. Used whenever
pop_pools
/country_pools
/region_pools
are not defined. - fallback
Pool StringId - The pool ID to use when all other pools are detected as unhealthy.
- name String
- The DNS hostname to associate with your load balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the load balancer will take precedence and the DNS record will not be used.
- zone
Id String - The zone ID to add the load balancer to. Modifying this attribute will force creation of a new resource.
- adaptive
Routings List<Property Map> - Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests.
- country
Pools List<Property Map> - A set containing mappings of country codes to a list of pool IDs (ordered by their failover priority) for the given country.
- description String
- Free text description.
- enabled Boolean
- Enable or disable the load balancer. Defaults to
true
. - location
Strategies List<Property Map> - Controls location-based steering for non-proxied requests.
- pop
Pools List<Property Map> - 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.
- proxied Boolean
- Whether the hostname gets Cloudflare's origin protection. Defaults to
false
. Conflicts withttl
. - random
Steerings List<Property Map> - Configures pool weights. When
steering_policy="random"
, a random pool is selected with probability proportional to pool weights. Whensteering_policy="least_outstanding_requests"
, pool weights are used to scale each pool's outstanding requests. Whensteering_policy="least_connections"
, pool weights are used to scale each pool's open connections. - region
Pools List<Property Map> - A set containing mappings of region codes to a list of pool IDs (ordered by their failover priority) for the given region.
- rules List<Property Map>
- A list of rules for this load balancer to execute.
- session
Affinity String - Specifies the type of session affinity the load balancer should use unless specified as
none
or""
(default). With valuecookie
, on the first request to a proxied load balancer, a cookie is generated, encoding information of which origin the request will be forwarded to. Subsequent requests, by the same client to the same load balancer, will be sent to the origin server the cookie encodes, for the duration of the cookie and as long as the origin server remains healthy. If the cookie has expired or the origin server is unhealthy then a new origin server is calculated and used. Valueip_cookie
behaves the same ascookie
except the initial origin selection is stable and based on the client's IP address. Available values:""
,none
,cookie
,ip_cookie
,header
. Defaults tonone
. - session
Affinity List<Property Map>Attributes - Configure attributes for session affinity.
- session
Affinity NumberTtl - Time, in seconds, until this load balancer's session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of
82800
(23 hours) will be used unlesssession_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 between1800
and604800
. - steering
Policy String - The method the load balancer uses to determine the route to your origin. Value
off
usesdefault_pool_ids
. Valuegeo
usespop_pools
/country_pools
/region_pools
. For non-proxied requests, thecountry
forcountry_pools
is determined bylocation_strategy
. Valuerandom
selects a pool randomly. Valuedynamic_latency
uses round trip time to select the closest pool indefault_pool_ids
(requires pool health checks). Valueproximity
uses the pools' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined bylocation_strategy
for non-proxied requests. Valueleast_outstanding_requests
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others. Valueleast_connections
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections. Value""
maps togeo
if you usepop_pools
/country_pools
/region_pools
otherwiseoff
. Available values:off
,geo
,dynamic_latency
,random
,proximity
,least_outstanding_requests
,least_connections
,""
Defaults to""
. - ttl Number
- Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This cannot be set for proxied load balancers. Defaults to
30
. Conflicts withproxied
.
Outputs
All input properties are implicitly available as output properties. Additionally, the LoadBalancer resource produces the following output properties:
- Created
On string - The RFC3339 timestamp of when the load balancer was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified
On string - The RFC3339 timestamp of when the load balancer was last modified.
- Created
On string - The RFC3339 timestamp of when the load balancer was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified
On string - The RFC3339 timestamp of when the load balancer was last modified.
- created
On String - The RFC3339 timestamp of when the load balancer was created.
- id String
- The provider-assigned unique ID for this managed resource.
- modified
On String - The RFC3339 timestamp of when the load balancer was last modified.
- created
On string - The RFC3339 timestamp of when the load balancer was created.
- id string
- The provider-assigned unique ID for this managed resource.
- modified
On 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.
- created
On String - The RFC3339 timestamp of when the load balancer was created.
- id String
- The provider-assigned unique ID for this managed resource.
- modified
On String - The RFC3339 timestamp of when the load balancer was last modified.
Look up 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,
adaptive_routings: Optional[Sequence[LoadBalancerAdaptiveRoutingArgs]] = None,
country_pools: Optional[Sequence[LoadBalancerCountryPoolArgs]] = 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,
location_strategies: Optional[Sequence[LoadBalancerLocationStrategyArgs]] = None,
modified_on: Optional[str] = None,
name: Optional[str] = None,
pop_pools: Optional[Sequence[LoadBalancerPopPoolArgs]] = None,
proxied: Optional[bool] = None,
random_steerings: Optional[Sequence[LoadBalancerRandomSteeringArgs]] = None,
region_pools: Optional[Sequence[LoadBalancerRegionPoolArgs]] = None,
rules: Optional[Sequence[LoadBalancerRuleArgs]] = None,
session_affinity: Optional[str] = None,
session_affinity_attributes: Optional[Sequence[LoadBalancerSessionAffinityAttributeArgs]] = 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)
public static LoadBalancer get(String name, Output<String> id, LoadBalancerState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
- Adaptive
Routings List<LoadBalancer Adaptive Routing> - Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests.
- Country
Pools List<LoadBalancer Country Pool> - A set containing mappings of country codes to a list of pool IDs (ordered by their failover priority) for the given country.
- Created
On string - The RFC3339 timestamp of when the load balancer was created.
- Default
Pool List<string>Ids - A list of pool IDs ordered by their failover priority. Used whenever
pop_pools
/country_pools
/region_pools
are not defined. - Description string
- Free text description.
- Enabled bool
- Enable or disable the load balancer. Defaults to
true
. - Fallback
Pool stringId - The pool ID to use when all other pools are detected as unhealthy.
- Location
Strategies List<LoadBalancer Location Strategy> - Controls location-based steering for non-proxied requests.
- Modified
On string - The RFC3339 timestamp of when the load balancer was last modified.
- Name string
- The DNS hostname to associate with your load balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the load balancer will take precedence and the DNS record will not be used.
- Pop
Pools List<LoadBalancer Pop Pool> - 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.
- Proxied bool
- Whether the hostname gets Cloudflare's origin protection. Defaults to
false
. Conflicts withttl
. - Random
Steerings List<LoadBalancer Random Steering> - Configures pool weights. When
steering_policy="random"
, a random pool is selected with probability proportional to pool weights. Whensteering_policy="least_outstanding_requests"
, pool weights are used to scale each pool's outstanding requests. Whensteering_policy="least_connections"
, pool weights are used to scale each pool's open connections. - Region
Pools List<LoadBalancer Region Pool> - A set containing mappings of region codes to a list of pool IDs (ordered by their failover priority) for the given region.
- Rules
List<Load
Balancer Rule> - A list of rules for this load balancer to execute.
- Session
Affinity string - Specifies the type of session affinity the load balancer should use unless specified as
none
or""
(default). With valuecookie
, on the first request to a proxied load balancer, a cookie is generated, encoding information of which origin the request will be forwarded to. Subsequent requests, by the same client to the same load balancer, will be sent to the origin server the cookie encodes, for the duration of the cookie and as long as the origin server remains healthy. If the cookie has expired or the origin server is unhealthy then a new origin server is calculated and used. Valueip_cookie
behaves the same ascookie
except the initial origin selection is stable and based on the client's IP address. Available values:""
,none
,cookie
,ip_cookie
,header
. Defaults tonone
. - Session
Affinity List<LoadAttributes Balancer Session Affinity Attribute> - Configure attributes for session affinity.
- Session
Affinity intTtl - Time, in seconds, until this load balancer's session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of
82800
(23 hours) will be used unlesssession_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 between1800
and604800
. - Steering
Policy string - The method the load balancer uses to determine the route to your origin. Value
off
usesdefault_pool_ids
. Valuegeo
usespop_pools
/country_pools
/region_pools
. For non-proxied requests, thecountry
forcountry_pools
is determined bylocation_strategy
. Valuerandom
selects a pool randomly. Valuedynamic_latency
uses round trip time to select the closest pool indefault_pool_ids
(requires pool health checks). Valueproximity
uses the pools' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined bylocation_strategy
for non-proxied requests. Valueleast_outstanding_requests
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others. Valueleast_connections
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections. Value""
maps togeo
if you usepop_pools
/country_pools
/region_pools
otherwiseoff
. Available values:off
,geo
,dynamic_latency
,random
,proximity
,least_outstanding_requests
,least_connections
,""
Defaults to""
. - Ttl int
- Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This cannot be set for proxied load balancers. Defaults to
30
. Conflicts withproxied
. - Zone
Id string - The zone ID to add the load balancer to. Modifying this attribute will force creation of a new resource.
- Adaptive
Routings []LoadBalancer Adaptive Routing Args - Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests.
- Country
Pools []LoadBalancer Country Pool Args - A set containing mappings of country codes to a list of pool IDs (ordered by their failover priority) for the given country.
- Created
On string - The RFC3339 timestamp of when the load balancer was created.
- Default
Pool []stringIds - A list of pool IDs ordered by their failover priority. Used whenever
pop_pools
/country_pools
/region_pools
are not defined. - Description string
- Free text description.
- Enabled bool
- Enable or disable the load balancer. Defaults to
true
. - Fallback
Pool stringId - The pool ID to use when all other pools are detected as unhealthy.
- Location
Strategies []LoadBalancer Location Strategy Args - Controls location-based steering for non-proxied requests.
- Modified
On string - The RFC3339 timestamp of when the load balancer was last modified.
- Name string
- The DNS hostname to associate with your load balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the load balancer will take precedence and the DNS record will not be used.
- Pop
Pools []LoadBalancer Pop Pool Args - 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.
- Proxied bool
- Whether the hostname gets Cloudflare's origin protection. Defaults to
false
. Conflicts withttl
. - Random
Steerings []LoadBalancer Random Steering Args - Configures pool weights. When
steering_policy="random"
, a random pool is selected with probability proportional to pool weights. Whensteering_policy="least_outstanding_requests"
, pool weights are used to scale each pool's outstanding requests. Whensteering_policy="least_connections"
, pool weights are used to scale each pool's open connections. - Region
Pools []LoadBalancer Region Pool Args - A set containing mappings of region codes to a list of pool IDs (ordered by their failover priority) for the given region.
- Rules
[]Load
Balancer Rule Args - A list of rules for this load balancer to execute.
- Session
Affinity string - Specifies the type of session affinity the load balancer should use unless specified as
none
or""
(default). With valuecookie
, on the first request to a proxied load balancer, a cookie is generated, encoding information of which origin the request will be forwarded to. Subsequent requests, by the same client to the same load balancer, will be sent to the origin server the cookie encodes, for the duration of the cookie and as long as the origin server remains healthy. If the cookie has expired or the origin server is unhealthy then a new origin server is calculated and used. Valueip_cookie
behaves the same ascookie
except the initial origin selection is stable and based on the client's IP address. Available values:""
,none
,cookie
,ip_cookie
,header
. Defaults tonone
. - Session
Affinity []LoadAttributes Balancer Session Affinity Attribute Args - Configure attributes for session affinity.
- Session
Affinity intTtl - Time, in seconds, until this load balancer's session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of
82800
(23 hours) will be used unlesssession_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 between1800
and604800
. - Steering
Policy string - The method the load balancer uses to determine the route to your origin. Value
off
usesdefault_pool_ids
. Valuegeo
usespop_pools
/country_pools
/region_pools
. For non-proxied requests, thecountry
forcountry_pools
is determined bylocation_strategy
. Valuerandom
selects a pool randomly. Valuedynamic_latency
uses round trip time to select the closest pool indefault_pool_ids
(requires pool health checks). Valueproximity
uses the pools' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined bylocation_strategy
for non-proxied requests. Valueleast_outstanding_requests
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others. Valueleast_connections
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections. Value""
maps togeo
if you usepop_pools
/country_pools
/region_pools
otherwiseoff
. Available values:off
,geo
,dynamic_latency
,random
,proximity
,least_outstanding_requests
,least_connections
,""
Defaults to""
. - Ttl int
- Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This cannot be set for proxied load balancers. Defaults to
30
. Conflicts withproxied
. - Zone
Id string - The zone ID to add the load balancer to. Modifying this attribute will force creation of a new resource.
- adaptive
Routings List<LoadBalancer Adaptive Routing> - Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests.
- country
Pools List<LoadBalancer Country Pool> - A set containing mappings of country codes to a list of pool IDs (ordered by their failover priority) for the given country.
- created
On String - The RFC3339 timestamp of when the load balancer was created.
- default
Pool List<String>Ids - A list of pool IDs ordered by their failover priority. Used whenever
pop_pools
/country_pools
/region_pools
are not defined. - description String
- Free text description.
- enabled Boolean
- Enable or disable the load balancer. Defaults to
true
. - fallback
Pool StringId - The pool ID to use when all other pools are detected as unhealthy.
- location
Strategies List<LoadBalancer Location Strategy> - Controls location-based steering for non-proxied requests.
- modified
On String - The RFC3339 timestamp of when the load balancer was last modified.
- name String
- The DNS hostname to associate with your load balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the load balancer will take precedence and the DNS record will not be used.
- pop
Pools List<LoadBalancer Pop Pool> - 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.
- proxied Boolean
- Whether the hostname gets Cloudflare's origin protection. Defaults to
false
. Conflicts withttl
. - random
Steerings List<LoadBalancer Random Steering> - Configures pool weights. When
steering_policy="random"
, a random pool is selected with probability proportional to pool weights. Whensteering_policy="least_outstanding_requests"
, pool weights are used to scale each pool's outstanding requests. Whensteering_policy="least_connections"
, pool weights are used to scale each pool's open connections. - region
Pools List<LoadBalancer Region Pool> - A set containing mappings of region codes to a list of pool IDs (ordered by their failover priority) for the given region.
- rules
List<Load
Balancer Rule> - A list of rules for this load balancer to execute.
- session
Affinity String - Specifies the type of session affinity the load balancer should use unless specified as
none
or""
(default). With valuecookie
, on the first request to a proxied load balancer, a cookie is generated, encoding information of which origin the request will be forwarded to. Subsequent requests, by the same client to the same load balancer, will be sent to the origin server the cookie encodes, for the duration of the cookie and as long as the origin server remains healthy. If the cookie has expired or the origin server is unhealthy then a new origin server is calculated and used. Valueip_cookie
behaves the same ascookie
except the initial origin selection is stable and based on the client's IP address. Available values:""
,none
,cookie
,ip_cookie
,header
. Defaults tonone
. - session
Affinity List<LoadAttributes Balancer Session Affinity Attribute> - Configure attributes for session affinity.
- session
Affinity IntegerTtl - Time, in seconds, until this load balancer's session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of
82800
(23 hours) will be used unlesssession_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 between1800
and604800
. - steering
Policy String - The method the load balancer uses to determine the route to your origin. Value
off
usesdefault_pool_ids
. Valuegeo
usespop_pools
/country_pools
/region_pools
. For non-proxied requests, thecountry
forcountry_pools
is determined bylocation_strategy
. Valuerandom
selects a pool randomly. Valuedynamic_latency
uses round trip time to select the closest pool indefault_pool_ids
(requires pool health checks). Valueproximity
uses the pools' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined bylocation_strategy
for non-proxied requests. Valueleast_outstanding_requests
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others. Valueleast_connections
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections. Value""
maps togeo
if you usepop_pools
/country_pools
/region_pools
otherwiseoff
. Available values:off
,geo
,dynamic_latency
,random
,proximity
,least_outstanding_requests
,least_connections
,""
Defaults to""
. - ttl Integer
- Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This cannot be set for proxied load balancers. Defaults to
30
. Conflicts withproxied
. - zone
Id String - The zone ID to add the load balancer to. Modifying this attribute will force creation of a new resource.
- adaptive
Routings LoadBalancer Adaptive Routing[] - Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests.
- country
Pools LoadBalancer Country Pool[] - A set containing mappings of country codes to a list of pool IDs (ordered by their failover priority) for the given country.
- created
On string - The RFC3339 timestamp of when the load balancer was created.
- default
Pool string[]Ids - A list of pool IDs ordered by their failover priority. Used whenever
pop_pools
/country_pools
/region_pools
are not defined. - description string
- Free text description.
- enabled boolean
- Enable or disable the load balancer. Defaults to
true
. - fallback
Pool stringId - The pool ID to use when all other pools are detected as unhealthy.
- location
Strategies LoadBalancer Location Strategy[] - Controls location-based steering for non-proxied requests.
- modified
On string - The RFC3339 timestamp of when the load balancer was last modified.
- name string
- The DNS hostname to associate with your load balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the load balancer will take precedence and the DNS record will not be used.
- pop
Pools LoadBalancer Pop Pool[] - 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.
- proxied boolean
- Whether the hostname gets Cloudflare's origin protection. Defaults to
false
. Conflicts withttl
. - random
Steerings LoadBalancer Random Steering[] - Configures pool weights. When
steering_policy="random"
, a random pool is selected with probability proportional to pool weights. Whensteering_policy="least_outstanding_requests"
, pool weights are used to scale each pool's outstanding requests. Whensteering_policy="least_connections"
, pool weights are used to scale each pool's open connections. - region
Pools LoadBalancer Region Pool[] - A set containing mappings of region codes to a list of pool IDs (ordered by their failover priority) for the given region.
- rules
Load
Balancer Rule[] - A list of rules for this load balancer to execute.
- session
Affinity string - Specifies the type of session affinity the load balancer should use unless specified as
none
or""
(default). With valuecookie
, on the first request to a proxied load balancer, a cookie is generated, encoding information of which origin the request will be forwarded to. Subsequent requests, by the same client to the same load balancer, will be sent to the origin server the cookie encodes, for the duration of the cookie and as long as the origin server remains healthy. If the cookie has expired or the origin server is unhealthy then a new origin server is calculated and used. Valueip_cookie
behaves the same ascookie
except the initial origin selection is stable and based on the client's IP address. Available values:""
,none
,cookie
,ip_cookie
,header
. Defaults tonone
. - session
Affinity LoadAttributes Balancer Session Affinity Attribute[] - Configure attributes for session affinity.
- session
Affinity numberTtl - Time, in seconds, until this load balancer's session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of
82800
(23 hours) will be used unlesssession_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 between1800
and604800
. - steering
Policy string - The method the load balancer uses to determine the route to your origin. Value
off
usesdefault_pool_ids
. Valuegeo
usespop_pools
/country_pools
/region_pools
. For non-proxied requests, thecountry
forcountry_pools
is determined bylocation_strategy
. Valuerandom
selects a pool randomly. Valuedynamic_latency
uses round trip time to select the closest pool indefault_pool_ids
(requires pool health checks). Valueproximity
uses the pools' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined bylocation_strategy
for non-proxied requests. Valueleast_outstanding_requests
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others. Valueleast_connections
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections. Value""
maps togeo
if you usepop_pools
/country_pools
/region_pools
otherwiseoff
. Available values:off
,geo
,dynamic_latency
,random
,proximity
,least_outstanding_requests
,least_connections
,""
Defaults to""
. - ttl number
- Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This cannot be set for proxied load balancers. Defaults to
30
. Conflicts withproxied
. - zone
Id string - The zone ID to add the load balancer to. Modifying this attribute will force creation of a new resource.
- adaptive_
routings Sequence[LoadBalancer Adaptive Routing Args] - Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests.
- country_
pools Sequence[LoadBalancer Country Pool Args] - A set containing mappings of country codes to a list of pool IDs (ordered by their failover priority) for the given country.
- created_
on str - The RFC3339 timestamp of when the load balancer was created.
- default_
pool_ Sequence[str]ids - A list of pool IDs ordered by their failover priority. Used whenever
pop_pools
/country_pools
/region_pools
are not defined. - description str
- Free text description.
- enabled bool
- Enable or disable the load balancer. Defaults to
true
. - fallback_
pool_ strid - The pool ID to use when all other pools are detected as unhealthy.
- location_
strategies Sequence[LoadBalancer Location Strategy Args] - Controls location-based steering for non-proxied requests.
- modified_
on str - The RFC3339 timestamp of when the load balancer was last modified.
- name str
- The DNS hostname to associate with your load balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the load balancer will take precedence and the DNS record will not be used.
- pop_
pools Sequence[LoadBalancer Pop Pool Args] - 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.
- proxied bool
- Whether the hostname gets Cloudflare's origin protection. Defaults to
false
. Conflicts withttl
. - random_
steerings Sequence[LoadBalancer Random Steering Args] - Configures pool weights. When
steering_policy="random"
, a random pool is selected with probability proportional to pool weights. Whensteering_policy="least_outstanding_requests"
, pool weights are used to scale each pool's outstanding requests. Whensteering_policy="least_connections"
, pool weights are used to scale each pool's open connections. - region_
pools Sequence[LoadBalancer Region Pool Args] - A set containing mappings of region codes to a list of pool IDs (ordered by their failover priority) for the given region.
- rules
Sequence[Load
Balancer Rule Args] - A list of rules for this load balancer to execute.
- session_
affinity str - Specifies the type of session affinity the load balancer should use unless specified as
none
or""
(default). With valuecookie
, on the first request to a proxied load balancer, a cookie is generated, encoding information of which origin the request will be forwarded to. Subsequent requests, by the same client to the same load balancer, will be sent to the origin server the cookie encodes, for the duration of the cookie and as long as the origin server remains healthy. If the cookie has expired or the origin server is unhealthy then a new origin server is calculated and used. Valueip_cookie
behaves the same ascookie
except the initial origin selection is stable and based on the client's IP address. Available values:""
,none
,cookie
,ip_cookie
,header
. Defaults tonone
. - session_
affinity_ Sequence[Loadattributes Balancer Session Affinity Attribute Args] - Configure attributes for session affinity.
- session_
affinity_ intttl - Time, in seconds, until this load balancer's session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of
82800
(23 hours) will be used unlesssession_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 between1800
and604800
. - steering_
policy str - The method the load balancer uses to determine the route to your origin. Value
off
usesdefault_pool_ids
. Valuegeo
usespop_pools
/country_pools
/region_pools
. For non-proxied requests, thecountry
forcountry_pools
is determined bylocation_strategy
. Valuerandom
selects a pool randomly. Valuedynamic_latency
uses round trip time to select the closest pool indefault_pool_ids
(requires pool health checks). Valueproximity
uses the pools' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined bylocation_strategy
for non-proxied requests. Valueleast_outstanding_requests
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others. Valueleast_connections
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections. Value""
maps togeo
if you usepop_pools
/country_pools
/region_pools
otherwiseoff
. Available values:off
,geo
,dynamic_latency
,random
,proximity
,least_outstanding_requests
,least_connections
,""
Defaults to""
. - ttl int
- Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This cannot be set for proxied load balancers. Defaults to
30
. Conflicts withproxied
. - zone_
id str - The zone ID to add the load balancer to. Modifying this attribute will force creation of a new resource.
- adaptive
Routings List<Property Map> - Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests.
- country
Pools List<Property Map> - A set containing mappings of country codes to a list of pool IDs (ordered by their failover priority) for the given country.
- created
On String - The RFC3339 timestamp of when the load balancer was created.
- default
Pool List<String>Ids - A list of pool IDs ordered by their failover priority. Used whenever
pop_pools
/country_pools
/region_pools
are not defined. - description String
- Free text description.
- enabled Boolean
- Enable or disable the load balancer. Defaults to
true
. - fallback
Pool StringId - The pool ID to use when all other pools are detected as unhealthy.
- location
Strategies List<Property Map> - Controls location-based steering for non-proxied requests.
- modified
On String - The RFC3339 timestamp of when the load balancer was last modified.
- name String
- The DNS hostname to associate with your load balancer. If this hostname already exists as a DNS record in Cloudflare's DNS, the load balancer will take precedence and the DNS record will not be used.
- pop
Pools List<Property Map> - 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.
- proxied Boolean
- Whether the hostname gets Cloudflare's origin protection. Defaults to
false
. Conflicts withttl
. - random
Steerings List<Property Map> - Configures pool weights. When
steering_policy="random"
, a random pool is selected with probability proportional to pool weights. Whensteering_policy="least_outstanding_requests"
, pool weights are used to scale each pool's outstanding requests. Whensteering_policy="least_connections"
, pool weights are used to scale each pool's open connections. - region
Pools List<Property Map> - A set containing mappings of region codes to a list of pool IDs (ordered by their failover priority) for the given region.
- rules List<Property Map>
- A list of rules for this load balancer to execute.
- session
Affinity String - Specifies the type of session affinity the load balancer should use unless specified as
none
or""
(default). With valuecookie
, on the first request to a proxied load balancer, a cookie is generated, encoding information of which origin the request will be forwarded to. Subsequent requests, by the same client to the same load balancer, will be sent to the origin server the cookie encodes, for the duration of the cookie and as long as the origin server remains healthy. If the cookie has expired or the origin server is unhealthy then a new origin server is calculated and used. Valueip_cookie
behaves the same ascookie
except the initial origin selection is stable and based on the client's IP address. Available values:""
,none
,cookie
,ip_cookie
,header
. Defaults tonone
. - session
Affinity List<Property Map>Attributes - Configure attributes for session affinity.
- session
Affinity NumberTtl - Time, in seconds, until this load balancer's session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of
82800
(23 hours) will be used unlesssession_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 between1800
and604800
. - steering
Policy String - The method the load balancer uses to determine the route to your origin. Value
off
usesdefault_pool_ids
. Valuegeo
usespop_pools
/country_pools
/region_pools
. For non-proxied requests, thecountry
forcountry_pools
is determined bylocation_strategy
. Valuerandom
selects a pool randomly. Valuedynamic_latency
uses round trip time to select the closest pool indefault_pool_ids
(requires pool health checks). Valueproximity
uses the pools' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined bylocation_strategy
for non-proxied requests. Valueleast_outstanding_requests
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others. Valueleast_connections
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections. Value""
maps togeo
if you usepop_pools
/country_pools
/region_pools
otherwiseoff
. Available values:off
,geo
,dynamic_latency
,random
,proximity
,least_outstanding_requests
,least_connections
,""
Defaults to""
. - ttl Number
- Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This cannot be set for proxied load balancers. Defaults to
30
. Conflicts withproxied
. - zone
Id String - The zone ID to add the load balancer to. Modifying this attribute will force creation of a new resource.
Supporting Types
LoadBalancerAdaptiveRouting, LoadBalancerAdaptiveRoutingArgs
- Failover
Across boolPools - Extends zero-downtime failover of requests to healthy origins from alternate pools, when no healthy alternate exists in the same pool, according to the failover order defined by traffic and origin steering. When set
false
, zero-downtime failover will only occur between origins within the same pool. Defaults tofalse
.
- Failover
Across boolPools - Extends zero-downtime failover of requests to healthy origins from alternate pools, when no healthy alternate exists in the same pool, according to the failover order defined by traffic and origin steering. When set
false
, zero-downtime failover will only occur between origins within the same pool. Defaults tofalse
.
- failover
Across BooleanPools - Extends zero-downtime failover of requests to healthy origins from alternate pools, when no healthy alternate exists in the same pool, according to the failover order defined by traffic and origin steering. When set
false
, zero-downtime failover will only occur between origins within the same pool. Defaults tofalse
.
- failover
Across booleanPools - Extends zero-downtime failover of requests to healthy origins from alternate pools, when no healthy alternate exists in the same pool, according to the failover order defined by traffic and origin steering. When set
false
, zero-downtime failover will only occur between origins within the same pool. Defaults tofalse
.
- failover_
across_ boolpools - Extends zero-downtime failover of requests to healthy origins from alternate pools, when no healthy alternate exists in the same pool, according to the failover order defined by traffic and origin steering. When set
false
, zero-downtime failover will only occur between origins within the same pool. Defaults tofalse
.
- failover
Across BooleanPools - Extends zero-downtime failover of requests to healthy origins from alternate pools, when no healthy alternate exists in the same pool, according to the failover order defined by traffic and origin steering. When set
false
, zero-downtime failover will only occur between origins within the same pool. Defaults tofalse
.
LoadBalancerCountryPool, LoadBalancerCountryPoolArgs
LoadBalancerLocationStrategy, LoadBalancerLocationStrategyArgs
- Mode string
- Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful. Value
pop
will use the Cloudflare PoP location. Valueresolver_ip
will use the DNS resolver GeoIP location. If the GeoIP lookup is unsuccessful, it will use the Cloudflare PoP location. Available values:pop
,resolver_ip
. Defaults topop
. - Prefer
Ecs string - Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location. Value
always
will always prefer ECS,never
will never prefer ECS,proximity
will prefer ECS only whensteering_policy="proximity"
, andgeo
will prefer ECS only whensteering_policy="geo"
. Available values:always
,never
,proximity
,geo
. Defaults toproximity
.
- Mode string
- Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful. Value
pop
will use the Cloudflare PoP location. Valueresolver_ip
will use the DNS resolver GeoIP location. If the GeoIP lookup is unsuccessful, it will use the Cloudflare PoP location. Available values:pop
,resolver_ip
. Defaults topop
. - Prefer
Ecs string - Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location. Value
always
will always prefer ECS,never
will never prefer ECS,proximity
will prefer ECS only whensteering_policy="proximity"
, andgeo
will prefer ECS only whensteering_policy="geo"
. Available values:always
,never
,proximity
,geo
. Defaults toproximity
.
- mode String
- Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful. Value
pop
will use the Cloudflare PoP location. Valueresolver_ip
will use the DNS resolver GeoIP location. If the GeoIP lookup is unsuccessful, it will use the Cloudflare PoP location. Available values:pop
,resolver_ip
. Defaults topop
. - prefer
Ecs String - Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location. Value
always
will always prefer ECS,never
will never prefer ECS,proximity
will prefer ECS only whensteering_policy="proximity"
, andgeo
will prefer ECS only whensteering_policy="geo"
. Available values:always
,never
,proximity
,geo
. Defaults toproximity
.
- mode string
- Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful. Value
pop
will use the Cloudflare PoP location. Valueresolver_ip
will use the DNS resolver GeoIP location. If the GeoIP lookup is unsuccessful, it will use the Cloudflare PoP location. Available values:pop
,resolver_ip
. Defaults topop
. - prefer
Ecs string - Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location. Value
always
will always prefer ECS,never
will never prefer ECS,proximity
will prefer ECS only whensteering_policy="proximity"
, andgeo
will prefer ECS only whensteering_policy="geo"
. Available values:always
,never
,proximity
,geo
. Defaults toproximity
.
- mode str
- Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful. Value
pop
will use the Cloudflare PoP location. Valueresolver_ip
will use the DNS resolver GeoIP location. If the GeoIP lookup is unsuccessful, it will use the Cloudflare PoP location. Available values:pop
,resolver_ip
. Defaults topop
. - prefer_
ecs str - Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location. Value
always
will always prefer ECS,never
will never prefer ECS,proximity
will prefer ECS only whensteering_policy="proximity"
, andgeo
will prefer ECS only whensteering_policy="geo"
. Available values:always
,never
,proximity
,geo
. Defaults toproximity
.
- mode String
- Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful. Value
pop
will use the Cloudflare PoP location. Valueresolver_ip
will use the DNS resolver GeoIP location. If the GeoIP lookup is unsuccessful, it will use the Cloudflare PoP location. Available values:pop
,resolver_ip
. Defaults topop
. - prefer
Ecs String - Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location. Value
always
will always prefer ECS,never
will never prefer ECS,proximity
will prefer ECS only whensteering_policy="proximity"
, andgeo
will prefer ECS only whensteering_policy="geo"
. Available values:always
,never
,proximity
,geo
. Defaults toproximity
.
LoadBalancerPopPool, LoadBalancerPopPoolArgs
- Pool
Ids 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.
- Pool
Ids []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 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.
- pool
Ids 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.
- pool
Ids 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.
LoadBalancerRandomSteering, LoadBalancerRandomSteeringArgs
- Default
Weight double - The default weight for pools in the load balancer that are not specified in the
pool_weights
map. - Pool
Weights Dictionary<string, double> - A mapping of pool IDs to custom weights. The weight is relative to other pools in the load balancer.
- Default
Weight float64 - The default weight for pools in the load balancer that are not specified in the
pool_weights
map. - Pool
Weights map[string]float64 - A mapping of pool IDs to custom weights. The weight is relative to other pools in the load balancer.
- default
Weight Double - The default weight for pools in the load balancer that are not specified in the
pool_weights
map. - pool
Weights Map<String,Double> - A mapping of pool IDs to custom weights. The weight is relative to other pools in the load balancer.
- default
Weight number - The default weight for pools in the load balancer that are not specified in the
pool_weights
map. - pool
Weights {[key: string]: number} - A mapping of pool IDs to custom weights. The weight is relative to other pools in the load balancer.
- default_
weight float - The default weight for pools in the load balancer that are not specified in the
pool_weights
map. - pool_
weights Mapping[str, float] - A mapping of pool IDs to custom weights. The weight is relative to other pools in the load balancer.
- default
Weight Number - The default weight for pools in the load balancer that are not specified in the
pool_weights
map. - pool
Weights Map<Number> - A mapping of pool IDs to custom weights. The weight is relative to other pools in the load balancer.
LoadBalancerRegionPool, LoadBalancerRegionPoolArgs
LoadBalancerRule, LoadBalancerRuleArgs
- Name string
- Human readable name for this rule.
- Condition string
- The statement to evaluate to determine if this rule's effects should be applied. An empty condition is always true. See load balancing rules.
- Disabled bool
- A disabled rule will not be executed.
- Fixed
Response LoadBalancer Rule Fixed Response - Settings for a HTTP response to return directly to the eyeball if the condition is true. Note:
overrides
orfixed_response
must be set. - Overrides
List<Load
Balancer Rule Override> - The load balancer settings to alter if this rule's
condition
is true. Note:overrides
orfixed_response
must be set. - Priority int
- Priority used when determining the order of rule execution. Lower values are executed first. If not provided, the list order will be used.
- Terminates bool
- Terminates indicates that if this rule is true no further rules should be executed. Note: setting a
fixed_response
forces this field totrue
.
- Name string
- Human readable name for this rule.
- Condition string
- The statement to evaluate to determine if this rule's effects should be applied. An empty condition is always true. See load balancing rules.
- Disabled bool
- A disabled rule will not be executed.
- Fixed
Response LoadBalancer Rule Fixed Response - Settings for a HTTP response to return directly to the eyeball if the condition is true. Note:
overrides
orfixed_response
must be set. - Overrides
[]Load
Balancer Rule Override - The load balancer settings to alter if this rule's
condition
is true. Note:overrides
orfixed_response
must be set. - Priority int
- Priority used when determining the order of rule execution. Lower values are executed first. If not provided, the list order will be used.
- Terminates bool
- Terminates indicates that if this rule is true no further rules should be executed. Note: setting a
fixed_response
forces this field totrue
.
- name String
- Human readable name for this rule.
- condition String
- The statement to evaluate to determine if this rule's effects should be applied. An empty condition is always true. See load balancing rules.
- disabled Boolean
- A disabled rule will not be executed.
- fixed
Response LoadBalancer Rule Fixed Response - Settings for a HTTP response to return directly to the eyeball if the condition is true. Note:
overrides
orfixed_response
must be set. - overrides
List<Load
Balancer Rule Override> - The load balancer settings to alter if this rule's
condition
is true. Note:overrides
orfixed_response
must be set. - priority Integer
- Priority used when determining the order of rule execution. Lower values are executed first. If not provided, the list order will be used.
- terminates Boolean
- Terminates indicates that if this rule is true no further rules should be executed. Note: setting a
fixed_response
forces this field totrue
.
- name string
- Human readable name for this rule.
- condition string
- The statement to evaluate to determine if this rule's effects should be applied. An empty condition is always true. See load balancing rules.
- disabled boolean
- A disabled rule will not be executed.
- fixed
Response LoadBalancer Rule Fixed Response - Settings for a HTTP response to return directly to the eyeball if the condition is true. Note:
overrides
orfixed_response
must be set. - overrides
Load
Balancer Rule Override[] - The load balancer settings to alter if this rule's
condition
is true. Note:overrides
orfixed_response
must be set. - priority number
- Priority used when determining the order of rule execution. Lower values are executed first. If not provided, the list order will be used.
- terminates boolean
- Terminates indicates that if this rule is true no further rules should be executed. Note: setting a
fixed_response
forces this field totrue
.
- name str
- Human readable name for this rule.
- condition str
- The statement to evaluate to determine if this rule's effects should be applied. An empty condition is always true. See load balancing rules.
- disabled bool
- A disabled rule will not be executed.
- fixed_
response LoadBalancer Rule Fixed Response - Settings for a HTTP response to return directly to the eyeball if the condition is true. Note:
overrides
orfixed_response
must be set. - overrides
Sequence[Load
Balancer Rule Override] - The load balancer settings to alter if this rule's
condition
is true. Note:overrides
orfixed_response
must be set. - priority int
- Priority used when determining the order of rule execution. Lower values are executed first. If not provided, the list order will be used.
- terminates bool
- Terminates indicates that if this rule is true no further rules should be executed. Note: setting a
fixed_response
forces this field totrue
.
- name String
- Human readable name for this rule.
- condition String
- The statement to evaluate to determine if this rule's effects should be applied. An empty condition is always true. See load balancing rules.
- disabled Boolean
- A disabled rule will not be executed.
- fixed
Response Property Map - Settings for a HTTP response to return directly to the eyeball if the condition is true. Note:
overrides
orfixed_response
must be set. - overrides List<Property Map>
- The load balancer settings to alter if this rule's
condition
is true. Note:overrides
orfixed_response
must be set. - priority Number
- Priority used when determining the order of rule execution. Lower values are executed first. If not provided, the list order will be used.
- terminates Boolean
- Terminates indicates that if this rule is true no further rules should be executed. Note: setting a
fixed_response
forces this field totrue
.
LoadBalancerRuleFixedResponse, LoadBalancerRuleFixedResponseArgs
- Content
Type string - The value of the HTTP context-type header for this fixed response.
- Location string
- The value of the HTTP location header for this fixed response.
- Message
Body string - The text used as the html body for this fixed response.
- Status
Code int - The HTTP status code used for this fixed response.
- Content
Type string - The value of the HTTP context-type header for this fixed response.
- Location string
- The value of the HTTP location header for this fixed response.
- Message
Body string - The text used as the html body for this fixed response.
- Status
Code int - The HTTP status code used for this fixed response.
- content
Type String - The value of the HTTP context-type header for this fixed response.
- location String
- The value of the HTTP location header for this fixed response.
- message
Body String - The text used as the html body for this fixed response.
- status
Code Integer - The HTTP status code used for this fixed response.
- content
Type string - The value of the HTTP context-type header for this fixed response.
- location string
- The value of the HTTP location header for this fixed response.
- message
Body string - The text used as the html body for this fixed response.
- status
Code number - The HTTP status code used for this fixed response.
- content_
type str - The value of the HTTP context-type header for this fixed response.
- location str
- The value of the HTTP location header for this fixed response.
- message_
body str - The text used as the html body for this fixed response.
- status_
code int - The HTTP status code used for this fixed response.
- content
Type String - The value of the HTTP context-type header for this fixed response.
- location String
- The value of the HTTP location header for this fixed response.
- message
Body String - The text used as the html body for this fixed response.
- status
Code Number - The HTTP status code used for this fixed response.
LoadBalancerRuleOverride, LoadBalancerRuleOverrideArgs
- Adaptive
Routings List<LoadBalancer Rule Override Adaptive Routing> - Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests.
- Country
Pools List<LoadBalancer Rule Override Country Pool> - A set containing mappings of country codes to a list of pool IDs (ordered by their failover priority) for the given country.
- Default
Pools List<string> - A list of pool IDs ordered by their failover priority. Used whenever
pop_pools
/country_pools
/region_pools
are not defined. - Fallback
Pool string - The pool ID to use when all other pools are detected as unhealthy.
- Location
Strategies List<LoadBalancer Rule Override Location Strategy> - Controls location-based steering for non-proxied requests.
- Pop
Pools List<LoadBalancer Rule Override Pop Pool> - 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.
- Random
Steerings List<LoadBalancer Rule Override Random Steering> - Configures pool weights. When
steering_policy="random"
, a random pool is selected with probability proportional to pool weights. Whensteering_policy="least_outstanding_requests"
, pool weights are used to scale each pool's outstanding requests. Whensteering_policy="least_connections"
, pool weights are used to scale each pool's open connections. - Region
Pools List<LoadBalancer Rule Override Region Pool> - A set containing mappings of region codes to a list of pool IDs (ordered by their failover priority) for the given region.
- Session
Affinity string - Configure attributes for session affinity.
- Session
Affinity List<LoadAttributes Balancer Rule Override Session Affinity Attribute> - Configure attributes for session affinity. Note that the property
drain_duration
is not currently supported as a rule override. - Session
Affinity intTtl - Time, in seconds, until this load balancer's session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of
82800
(23 hours) will be used unlesssession_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 between1800
and604800
. - Steering
Policy string - The method the load balancer uses to determine the route to your origin. Value
off
usesdefault_pool_ids
. Valuegeo
usespop_pools
/country_pools
/region_pools
. For non-proxied requests, thecountry
forcountry_pools
is determined bylocation_strategy
. Valuerandom
selects a pool randomly. Valuedynamic_latency
uses round trip time to select the closest pool indefault_pool_ids
(requires pool health checks). Valueproximity
uses the pools' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined bylocation_strategy
for non-proxied requests. Valueleast_outstanding_requests
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others. Valueleast_connections
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections. Value""
maps togeo
if you usepop_pools
/country_pools
/region_pools
otherwiseoff
. Available values:off
,geo
,dynamic_latency
,random
,proximity
,least_outstanding_requests
,least_connections
,""
Defaults to""
. - Ttl int
- Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This cannot be set for proxied load balancers. Defaults to
30
.
- Adaptive
Routings []LoadBalancer Rule Override Adaptive Routing - Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests.
- Country
Pools []LoadBalancer Rule Override Country Pool - A set containing mappings of country codes to a list of pool IDs (ordered by their failover priority) for the given country.
- Default
Pools []string - A list of pool IDs ordered by their failover priority. Used whenever
pop_pools
/country_pools
/region_pools
are not defined. - Fallback
Pool string - The pool ID to use when all other pools are detected as unhealthy.
- Location
Strategies []LoadBalancer Rule Override Location Strategy - Controls location-based steering for non-proxied requests.
- Pop
Pools []LoadBalancer Rule Override Pop Pool - 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.
- Random
Steerings []LoadBalancer Rule Override Random Steering - Configures pool weights. When
steering_policy="random"
, a random pool is selected with probability proportional to pool weights. Whensteering_policy="least_outstanding_requests"
, pool weights are used to scale each pool's outstanding requests. Whensteering_policy="least_connections"
, pool weights are used to scale each pool's open connections. - Region
Pools []LoadBalancer Rule Override Region Pool - A set containing mappings of region codes to a list of pool IDs (ordered by their failover priority) for the given region.
- Session
Affinity string - Configure attributes for session affinity.
- Session
Affinity []LoadAttributes Balancer Rule Override Session Affinity Attribute - Configure attributes for session affinity. Note that the property
drain_duration
is not currently supported as a rule override. - Session
Affinity intTtl - Time, in seconds, until this load balancer's session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of
82800
(23 hours) will be used unlesssession_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 between1800
and604800
. - Steering
Policy string - The method the load balancer uses to determine the route to your origin. Value
off
usesdefault_pool_ids
. Valuegeo
usespop_pools
/country_pools
/region_pools
. For non-proxied requests, thecountry
forcountry_pools
is determined bylocation_strategy
. Valuerandom
selects a pool randomly. Valuedynamic_latency
uses round trip time to select the closest pool indefault_pool_ids
(requires pool health checks). Valueproximity
uses the pools' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined bylocation_strategy
for non-proxied requests. Valueleast_outstanding_requests
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others. Valueleast_connections
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections. Value""
maps togeo
if you usepop_pools
/country_pools
/region_pools
otherwiseoff
. Available values:off
,geo
,dynamic_latency
,random
,proximity
,least_outstanding_requests
,least_connections
,""
Defaults to""
. - Ttl int
- Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This cannot be set for proxied load balancers. Defaults to
30
.
- adaptive
Routings List<LoadBalancer Rule Override Adaptive Routing> - Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests.
- country
Pools List<LoadBalancer Rule Override Country Pool> - A set containing mappings of country codes to a list of pool IDs (ordered by their failover priority) for the given country.
- default
Pools List<String> - A list of pool IDs ordered by their failover priority. Used whenever
pop_pools
/country_pools
/region_pools
are not defined. - fallback
Pool String - The pool ID to use when all other pools are detected as unhealthy.
- location
Strategies List<LoadBalancer Rule Override Location Strategy> - Controls location-based steering for non-proxied requests.
- pop
Pools List<LoadBalancer Rule Override Pop Pool> - 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.
- random
Steerings List<LoadBalancer Rule Override Random Steering> - Configures pool weights. When
steering_policy="random"
, a random pool is selected with probability proportional to pool weights. Whensteering_policy="least_outstanding_requests"
, pool weights are used to scale each pool's outstanding requests. Whensteering_policy="least_connections"
, pool weights are used to scale each pool's open connections. - region
Pools List<LoadBalancer Rule Override Region Pool> - A set containing mappings of region codes to a list of pool IDs (ordered by their failover priority) for the given region.
- session
Affinity String - Configure attributes for session affinity.
- session
Affinity List<LoadAttributes Balancer Rule Override Session Affinity Attribute> - Configure attributes for session affinity. Note that the property
drain_duration
is not currently supported as a rule override. - session
Affinity IntegerTtl - Time, in seconds, until this load balancer's session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of
82800
(23 hours) will be used unlesssession_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 between1800
and604800
. - steering
Policy String - The method the load balancer uses to determine the route to your origin. Value
off
usesdefault_pool_ids
. Valuegeo
usespop_pools
/country_pools
/region_pools
. For non-proxied requests, thecountry
forcountry_pools
is determined bylocation_strategy
. Valuerandom
selects a pool randomly. Valuedynamic_latency
uses round trip time to select the closest pool indefault_pool_ids
(requires pool health checks). Valueproximity
uses the pools' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined bylocation_strategy
for non-proxied requests. Valueleast_outstanding_requests
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others. Valueleast_connections
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections. Value""
maps togeo
if you usepop_pools
/country_pools
/region_pools
otherwiseoff
. Available values:off
,geo
,dynamic_latency
,random
,proximity
,least_outstanding_requests
,least_connections
,""
Defaults to""
. - ttl Integer
- Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This cannot be set for proxied load balancers. Defaults to
30
.
- adaptive
Routings LoadBalancer Rule Override Adaptive Routing[] - Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests.
- country
Pools LoadBalancer Rule Override Country Pool[] - A set containing mappings of country codes to a list of pool IDs (ordered by their failover priority) for the given country.
- default
Pools string[] - A list of pool IDs ordered by their failover priority. Used whenever
pop_pools
/country_pools
/region_pools
are not defined. - fallback
Pool string - The pool ID to use when all other pools are detected as unhealthy.
- location
Strategies LoadBalancer Rule Override Location Strategy[] - Controls location-based steering for non-proxied requests.
- pop
Pools LoadBalancer Rule Override Pop Pool[] - 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.
- random
Steerings LoadBalancer Rule Override Random Steering[] - Configures pool weights. When
steering_policy="random"
, a random pool is selected with probability proportional to pool weights. Whensteering_policy="least_outstanding_requests"
, pool weights are used to scale each pool's outstanding requests. Whensteering_policy="least_connections"
, pool weights are used to scale each pool's open connections. - region
Pools LoadBalancer Rule Override Region Pool[] - A set containing mappings of region codes to a list of pool IDs (ordered by their failover priority) for the given region.
- session
Affinity string - Configure attributes for session affinity.
- session
Affinity LoadAttributes Balancer Rule Override Session Affinity Attribute[] - Configure attributes for session affinity. Note that the property
drain_duration
is not currently supported as a rule override. - session
Affinity numberTtl - Time, in seconds, until this load balancer's session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of
82800
(23 hours) will be used unlesssession_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 between1800
and604800
. - steering
Policy string - The method the load balancer uses to determine the route to your origin. Value
off
usesdefault_pool_ids
. Valuegeo
usespop_pools
/country_pools
/region_pools
. For non-proxied requests, thecountry
forcountry_pools
is determined bylocation_strategy
. Valuerandom
selects a pool randomly. Valuedynamic_latency
uses round trip time to select the closest pool indefault_pool_ids
(requires pool health checks). Valueproximity
uses the pools' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined bylocation_strategy
for non-proxied requests. Valueleast_outstanding_requests
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others. Valueleast_connections
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections. Value""
maps togeo
if you usepop_pools
/country_pools
/region_pools
otherwiseoff
. Available values:off
,geo
,dynamic_latency
,random
,proximity
,least_outstanding_requests
,least_connections
,""
Defaults to""
. - ttl number
- Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This cannot be set for proxied load balancers. Defaults to
30
.
- adaptive_
routings Sequence[LoadBalancer Rule Override Adaptive Routing] - Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests.
- country_
pools Sequence[LoadBalancer Rule Override Country Pool] - A set containing mappings of country codes to a list of pool IDs (ordered by their failover priority) for the given country.
- default_
pools Sequence[str] - A list of pool IDs ordered by their failover priority. Used whenever
pop_pools
/country_pools
/region_pools
are not defined. - fallback_
pool str - The pool ID to use when all other pools are detected as unhealthy.
- location_
strategies Sequence[LoadBalancer Rule Override Location Strategy] - Controls location-based steering for non-proxied requests.
- pop_
pools Sequence[LoadBalancer Rule Override Pop Pool] - 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.
- random_
steerings Sequence[LoadBalancer Rule Override Random Steering] - Configures pool weights. When
steering_policy="random"
, a random pool is selected with probability proportional to pool weights. Whensteering_policy="least_outstanding_requests"
, pool weights are used to scale each pool's outstanding requests. Whensteering_policy="least_connections"
, pool weights are used to scale each pool's open connections. - region_
pools Sequence[LoadBalancer Rule Override Region Pool] - A set containing mappings of region codes to a list of pool IDs (ordered by their failover priority) for the given region.
- session_
affinity str - Configure attributes for session affinity.
- session_
affinity_ Sequence[Loadattributes Balancer Rule Override Session Affinity Attribute] - Configure attributes for session affinity. Note that the property
drain_duration
is not currently supported as a rule override. - session_
affinity_ intttl - Time, in seconds, until this load balancer's session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of
82800
(23 hours) will be used unlesssession_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 between1800
and604800
. - steering_
policy str - The method the load balancer uses to determine the route to your origin. Value
off
usesdefault_pool_ids
. Valuegeo
usespop_pools
/country_pools
/region_pools
. For non-proxied requests, thecountry
forcountry_pools
is determined bylocation_strategy
. Valuerandom
selects a pool randomly. Valuedynamic_latency
uses round trip time to select the closest pool indefault_pool_ids
(requires pool health checks). Valueproximity
uses the pools' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined bylocation_strategy
for non-proxied requests. Valueleast_outstanding_requests
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others. Valueleast_connections
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections. Value""
maps togeo
if you usepop_pools
/country_pools
/region_pools
otherwiseoff
. Available values:off
,geo
,dynamic_latency
,random
,proximity
,least_outstanding_requests
,least_connections
,""
Defaults to""
. - ttl int
- Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This cannot be set for proxied load balancers. Defaults to
30
.
- adaptive
Routings List<Property Map> - Controls features that modify the routing of requests to pools and origins in response to dynamic conditions, such as during the interval between active health monitoring requests.
- country
Pools List<Property Map> - A set containing mappings of country codes to a list of pool IDs (ordered by their failover priority) for the given country.
- default
Pools List<String> - A list of pool IDs ordered by their failover priority. Used whenever
pop_pools
/country_pools
/region_pools
are not defined. - fallback
Pool String - The pool ID to use when all other pools are detected as unhealthy.
- location
Strategies List<Property Map> - Controls location-based steering for non-proxied requests.
- pop
Pools List<Property Map> - 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.
- random
Steerings List<Property Map> - Configures pool weights. When
steering_policy="random"
, a random pool is selected with probability proportional to pool weights. Whensteering_policy="least_outstanding_requests"
, pool weights are used to scale each pool's outstanding requests. Whensteering_policy="least_connections"
, pool weights are used to scale each pool's open connections. - region
Pools List<Property Map> - A set containing mappings of region codes to a list of pool IDs (ordered by their failover priority) for the given region.
- session
Affinity String - Configure attributes for session affinity.
- session
Affinity List<Property Map>Attributes - Configure attributes for session affinity. Note that the property
drain_duration
is not currently supported as a rule override. - session
Affinity NumberTtl - Time, in seconds, until this load balancer's session affinity cookie expires after being created. This parameter is ignored unless a supported session affinity policy is set. The current default of
82800
(23 hours) will be used unlesssession_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 between1800
and604800
. - steering
Policy String - The method the load balancer uses to determine the route to your origin. Value
off
usesdefault_pool_ids
. Valuegeo
usespop_pools
/country_pools
/region_pools
. For non-proxied requests, thecountry
forcountry_pools
is determined bylocation_strategy
. Valuerandom
selects a pool randomly. Valuedynamic_latency
uses round trip time to select the closest pool indefault_pool_ids
(requires pool health checks). Valueproximity
uses the pools' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined bylocation_strategy
for non-proxied requests. Valueleast_outstanding_requests
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of outstanding requests. Pools with more pending requests are weighted proportionately less relative to others. Valueleast_connections
selects a pool by taking into considerationrandom_steering
weights, as well as each pool's number of open connections. Pools with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections. Value""
maps togeo
if you usepop_pools
/country_pools
/region_pools
otherwiseoff
. Available values:off
,geo
,dynamic_latency
,random
,proximity
,least_outstanding_requests
,least_connections
,""
Defaults to""
. - ttl Number
- Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This cannot be set for proxied load balancers. Defaults to
30
.
LoadBalancerRuleOverrideAdaptiveRouting, LoadBalancerRuleOverrideAdaptiveRoutingArgs
- Failover
Across boolPools - Extends zero-downtime failover of requests to healthy origins from alternate pools, when no healthy alternate exists in the same pool, according to the failover order defined by traffic and origin steering. When set
false
, zero-downtime failover will only occur between origins within the same pool.
- Failover
Across boolPools - Extends zero-downtime failover of requests to healthy origins from alternate pools, when no healthy alternate exists in the same pool, according to the failover order defined by traffic and origin steering. When set
false
, zero-downtime failover will only occur between origins within the same pool.
- failover
Across BooleanPools - Extends zero-downtime failover of requests to healthy origins from alternate pools, when no healthy alternate exists in the same pool, according to the failover order defined by traffic and origin steering. When set
false
, zero-downtime failover will only occur between origins within the same pool.
- failover
Across booleanPools - Extends zero-downtime failover of requests to healthy origins from alternate pools, when no healthy alternate exists in the same pool, according to the failover order defined by traffic and origin steering. When set
false
, zero-downtime failover will only occur between origins within the same pool.
- failover_
across_ boolpools - Extends zero-downtime failover of requests to healthy origins from alternate pools, when no healthy alternate exists in the same pool, according to the failover order defined by traffic and origin steering. When set
false
, zero-downtime failover will only occur between origins within the same pool.
- failover
Across BooleanPools - Extends zero-downtime failover of requests to healthy origins from alternate pools, when no healthy alternate exists in the same pool, according to the failover order defined by traffic and origin steering. When set
false
, zero-downtime failover will only occur between origins within the same pool.
LoadBalancerRuleOverrideCountryPool, LoadBalancerRuleOverrideCountryPoolArgs
LoadBalancerRuleOverrideLocationStrategy, LoadBalancerRuleOverrideLocationStrategyArgs
- Mode string
- Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful. Value
pop
will use the Cloudflare PoP location. Valueresolver_ip
will use the DNS resolver GeoIP location. If the GeoIP lookup is unsuccessful, it will use the Cloudflare PoP location. Available values:pop
,resolver_ip
. - Prefer
Ecs string - Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location. Value
always
will always prefer ECS,never
will never prefer ECS,proximity
will prefer ECS only whensteering_policy="proximity"
, andgeo
will prefer ECS only whensteering_policy="geo"
. Available values:always
,never
,proximity
,geo
.
- Mode string
- Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful. Value
pop
will use the Cloudflare PoP location. Valueresolver_ip
will use the DNS resolver GeoIP location. If the GeoIP lookup is unsuccessful, it will use the Cloudflare PoP location. Available values:pop
,resolver_ip
. - Prefer
Ecs string - Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location. Value
always
will always prefer ECS,never
will never prefer ECS,proximity
will prefer ECS only whensteering_policy="proximity"
, andgeo
will prefer ECS only whensteering_policy="geo"
. Available values:always
,never
,proximity
,geo
.
- mode String
- Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful. Value
pop
will use the Cloudflare PoP location. Valueresolver_ip
will use the DNS resolver GeoIP location. If the GeoIP lookup is unsuccessful, it will use the Cloudflare PoP location. Available values:pop
,resolver_ip
. - prefer
Ecs String - Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location. Value
always
will always prefer ECS,never
will never prefer ECS,proximity
will prefer ECS only whensteering_policy="proximity"
, andgeo
will prefer ECS only whensteering_policy="geo"
. Available values:always
,never
,proximity
,geo
.
- mode string
- Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful. Value
pop
will use the Cloudflare PoP location. Valueresolver_ip
will use the DNS resolver GeoIP location. If the GeoIP lookup is unsuccessful, it will use the Cloudflare PoP location. Available values:pop
,resolver_ip
. - prefer
Ecs string - Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location. Value
always
will always prefer ECS,never
will never prefer ECS,proximity
will prefer ECS only whensteering_policy="proximity"
, andgeo
will prefer ECS only whensteering_policy="geo"
. Available values:always
,never
,proximity
,geo
.
- mode str
- Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful. Value
pop
will use the Cloudflare PoP location. Valueresolver_ip
will use the DNS resolver GeoIP location. If the GeoIP lookup is unsuccessful, it will use the Cloudflare PoP location. Available values:pop
,resolver_ip
. - prefer_
ecs str - Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location. Value
always
will always prefer ECS,never
will never prefer ECS,proximity
will prefer ECS only whensteering_policy="proximity"
, andgeo
will prefer ECS only whensteering_policy="geo"
. Available values:always
,never
,proximity
,geo
.
- mode String
- Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful. Value
pop
will use the Cloudflare PoP location. Valueresolver_ip
will use the DNS resolver GeoIP location. If the GeoIP lookup is unsuccessful, it will use the Cloudflare PoP location. Available values:pop
,resolver_ip
. - prefer
Ecs String - Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location. Value
always
will always prefer ECS,never
will never prefer ECS,proximity
will prefer ECS only whensteering_policy="proximity"
, andgeo
will prefer ECS only whensteering_policy="geo"
. Available values:always
,never
,proximity
,geo
.
LoadBalancerRuleOverridePopPool, LoadBalancerRuleOverridePopPoolArgs
- Pool
Ids 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.
- Pool
Ids []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 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.
- pool
Ids 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.
- pool
Ids 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.
LoadBalancerRuleOverrideRandomSteering, LoadBalancerRuleOverrideRandomSteeringArgs
- Default
Weight double - The default weight for pools in the load balancer that are not specified in the
pool_weights
map. - Pool
Weights Dictionary<string, double> - A mapping of pool IDs to custom weights. The weight is relative to other pools in the load balancer.
- Default
Weight float64 - The default weight for pools in the load balancer that are not specified in the
pool_weights
map. - Pool
Weights map[string]float64 - A mapping of pool IDs to custom weights. The weight is relative to other pools in the load balancer.
- default
Weight Double - The default weight for pools in the load balancer that are not specified in the
pool_weights
map. - pool
Weights Map<String,Double> - A mapping of pool IDs to custom weights. The weight is relative to other pools in the load balancer.
- default
Weight number - The default weight for pools in the load balancer that are not specified in the
pool_weights
map. - pool
Weights {[key: string]: number} - A mapping of pool IDs to custom weights. The weight is relative to other pools in the load balancer.
- default_
weight float - The default weight for pools in the load balancer that are not specified in the
pool_weights
map. - pool_
weights Mapping[str, float] - A mapping of pool IDs to custom weights. The weight is relative to other pools in the load balancer.
- default
Weight Number - The default weight for pools in the load balancer that are not specified in the
pool_weights
map. - pool
Weights Map<Number> - A mapping of pool IDs to custom weights. The weight is relative to other pools in the load balancer.
LoadBalancerRuleOverrideRegionPool, LoadBalancerRuleOverrideRegionPoolArgs
LoadBalancerRuleOverrideSessionAffinityAttribute, LoadBalancerRuleOverrideSessionAffinityAttributeArgs
- Headers List<string>
- Configures the HTTP header names to use when header session affinity is enabled.
- Require
All boolHeaders - Configures how headers are used when header session affinity is enabled. Set to true to require all headers to be present on requests in order for sessions to be created or false to require at least one header to be present. Defaults to
false
. - Samesite string
- Configures the SameSite attribute on session affinity cookie. Value
Auto
will be translated toLax
orNone
depending if Always Use HTTPS is enabled. Note: when using valueNone
, then you can not setsecure="Never"
. Available values:Auto
,Lax
,None
,Strict
. - Secure string
- Configures the Secure attribute on session affinity cookie. Value
Always
indicates the Secure attribute will be set in the Set-Cookie header,Never
indicates the Secure attribute will not be set, andAuto
will set the Secure attribute depending if Always Use HTTPS is enabled. Available values:Auto
,Always
,Never
. - Zero
Downtime stringFailover - Configures the zero-downtime failover between origins within a pool when session affinity is enabled. Value
none
means no failover takes place for sessions pinned to the origin. Valuetemporary
means traffic will be sent to another other healthy origin until the originally pinned origin is available; note that this can potentially result in heavy origin flapping. Valuesticky
means the session affinity cookie is updated and subsequent requests are sent to the new origin. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. Available values:none
,temporary
,sticky
.
- Headers []string
- Configures the HTTP header names to use when header session affinity is enabled.
- Require
All boolHeaders - Configures how headers are used when header session affinity is enabled. Set to true to require all headers to be present on requests in order for sessions to be created or false to require at least one header to be present. Defaults to
false
. - Samesite string
- Configures the SameSite attribute on session affinity cookie. Value
Auto
will be translated toLax
orNone
depending if Always Use HTTPS is enabled. Note: when using valueNone
, then you can not setsecure="Never"
. Available values:Auto
,Lax
,None
,Strict
. - Secure string
- Configures the Secure attribute on session affinity cookie. Value
Always
indicates the Secure attribute will be set in the Set-Cookie header,Never
indicates the Secure attribute will not be set, andAuto
will set the Secure attribute depending if Always Use HTTPS is enabled. Available values:Auto
,Always
,Never
. - Zero
Downtime stringFailover - Configures the zero-downtime failover between origins within a pool when session affinity is enabled. Value
none
means no failover takes place for sessions pinned to the origin. Valuetemporary
means traffic will be sent to another other healthy origin until the originally pinned origin is available; note that this can potentially result in heavy origin flapping. Valuesticky
means the session affinity cookie is updated and subsequent requests are sent to the new origin. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. Available values:none
,temporary
,sticky
.
- headers List<String>
- Configures the HTTP header names to use when header session affinity is enabled.
- require
All BooleanHeaders - Configures how headers are used when header session affinity is enabled. Set to true to require all headers to be present on requests in order for sessions to be created or false to require at least one header to be present. Defaults to
false
. - samesite String
- Configures the SameSite attribute on session affinity cookie. Value
Auto
will be translated toLax
orNone
depending if Always Use HTTPS is enabled. Note: when using valueNone
, then you can not setsecure="Never"
. Available values:Auto
,Lax
,None
,Strict
. - secure String
- Configures the Secure attribute on session affinity cookie. Value
Always
indicates the Secure attribute will be set in the Set-Cookie header,Never
indicates the Secure attribute will not be set, andAuto
will set the Secure attribute depending if Always Use HTTPS is enabled. Available values:Auto
,Always
,Never
. - zero
Downtime StringFailover - Configures the zero-downtime failover between origins within a pool when session affinity is enabled. Value
none
means no failover takes place for sessions pinned to the origin. Valuetemporary
means traffic will be sent to another other healthy origin until the originally pinned origin is available; note that this can potentially result in heavy origin flapping. Valuesticky
means the session affinity cookie is updated and subsequent requests are sent to the new origin. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. Available values:none
,temporary
,sticky
.
- headers string[]
- Configures the HTTP header names to use when header session affinity is enabled.
- require
All booleanHeaders - Configures how headers are used when header session affinity is enabled. Set to true to require all headers to be present on requests in order for sessions to be created or false to require at least one header to be present. Defaults to
false
. - samesite string
- Configures the SameSite attribute on session affinity cookie. Value
Auto
will be translated toLax
orNone
depending if Always Use HTTPS is enabled. Note: when using valueNone
, then you can not setsecure="Never"
. Available values:Auto
,Lax
,None
,Strict
. - secure string
- Configures the Secure attribute on session affinity cookie. Value
Always
indicates the Secure attribute will be set in the Set-Cookie header,Never
indicates the Secure attribute will not be set, andAuto
will set the Secure attribute depending if Always Use HTTPS is enabled. Available values:Auto
,Always
,Never
. - zero
Downtime stringFailover - Configures the zero-downtime failover between origins within a pool when session affinity is enabled. Value
none
means no failover takes place for sessions pinned to the origin. Valuetemporary
means traffic will be sent to another other healthy origin until the originally pinned origin is available; note that this can potentially result in heavy origin flapping. Valuesticky
means the session affinity cookie is updated and subsequent requests are sent to the new origin. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. Available values:none
,temporary
,sticky
.
- headers Sequence[str]
- Configures the HTTP header names to use when header session affinity is enabled.
- require_
all_ boolheaders - Configures how headers are used when header session affinity is enabled. Set to true to require all headers to be present on requests in order for sessions to be created or false to require at least one header to be present. Defaults to
false
. - samesite str
- Configures the SameSite attribute on session affinity cookie. Value
Auto
will be translated toLax
orNone
depending if Always Use HTTPS is enabled. Note: when using valueNone
, then you can not setsecure="Never"
. Available values:Auto
,Lax
,None
,Strict
. - secure str
- Configures the Secure attribute on session affinity cookie. Value
Always
indicates the Secure attribute will be set in the Set-Cookie header,Never
indicates the Secure attribute will not be set, andAuto
will set the Secure attribute depending if Always Use HTTPS is enabled. Available values:Auto
,Always
,Never
. - zero_
downtime_ strfailover - Configures the zero-downtime failover between origins within a pool when session affinity is enabled. Value
none
means no failover takes place for sessions pinned to the origin. Valuetemporary
means traffic will be sent to another other healthy origin until the originally pinned origin is available; note that this can potentially result in heavy origin flapping. Valuesticky
means the session affinity cookie is updated and subsequent requests are sent to the new origin. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. Available values:none
,temporary
,sticky
.
- headers List<String>
- Configures the HTTP header names to use when header session affinity is enabled.
- require
All BooleanHeaders - Configures how headers are used when header session affinity is enabled. Set to true to require all headers to be present on requests in order for sessions to be created or false to require at least one header to be present. Defaults to
false
. - samesite String
- Configures the SameSite attribute on session affinity cookie. Value
Auto
will be translated toLax
orNone
depending if Always Use HTTPS is enabled. Note: when using valueNone
, then you can not setsecure="Never"
. Available values:Auto
,Lax
,None
,Strict
. - secure String
- Configures the Secure attribute on session affinity cookie. Value
Always
indicates the Secure attribute will be set in the Set-Cookie header,Never
indicates the Secure attribute will not be set, andAuto
will set the Secure attribute depending if Always Use HTTPS is enabled. Available values:Auto
,Always
,Never
. - zero
Downtime StringFailover - Configures the zero-downtime failover between origins within a pool when session affinity is enabled. Value
none
means no failover takes place for sessions pinned to the origin. Valuetemporary
means traffic will be sent to another other healthy origin until the originally pinned origin is available; note that this can potentially result in heavy origin flapping. Valuesticky
means the session affinity cookie is updated and subsequent requests are sent to the new origin. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. Available values:none
,temporary
,sticky
.
LoadBalancerSessionAffinityAttribute, LoadBalancerSessionAffinityAttributeArgs
- Drain
Duration int - Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer. Defaults to
0
. - Headers List<string>
- Configures the HTTP header names to use when header session affinity is enabled.
- Require
All boolHeaders - Configures how headers are used when header session affinity is enabled. Set to true to require all headers to be present on requests in order for sessions to be created or false to require at least one header to be present. Defaults to
false
. - Samesite string
- Configures the SameSite attribute on session affinity cookie. Value
Auto
will be translated toLax
orNone
depending if Always Use HTTPS is enabled. Note: when using valueNone
, then you can not setsecure="Never"
. Available values:Auto
,Lax
,None
,Strict
. Defaults toAuto
. - Secure string
- Configures the Secure attribute on session affinity cookie. Value
Always
indicates the Secure attribute will be set in the Set-Cookie header,Never
indicates the Secure attribute will not be set, andAuto
will set the Secure attribute depending if Always Use HTTPS is enabled. Available values:Auto
,Always
,Never
. Defaults toAuto
. - Zero
Downtime stringFailover - Configures the zero-downtime failover between origins within a pool when session affinity is enabled. Value
none
means no failover takes place for sessions pinned to the origin. Valuetemporary
means traffic will be sent to another other healthy origin until the originally pinned origin is available; note that this can potentially result in heavy origin flapping. Valuesticky
means the session affinity cookie is updated and subsequent requests are sent to the new origin. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. Available values:none
,temporary
,sticky
. Defaults tonone
.
- Drain
Duration int - Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer. Defaults to
0
. - Headers []string
- Configures the HTTP header names to use when header session affinity is enabled.
- Require
All boolHeaders - Configures how headers are used when header session affinity is enabled. Set to true to require all headers to be present on requests in order for sessions to be created or false to require at least one header to be present. Defaults to
false
. - Samesite string
- Configures the SameSite attribute on session affinity cookie. Value
Auto
will be translated toLax
orNone
depending if Always Use HTTPS is enabled. Note: when using valueNone
, then you can not setsecure="Never"
. Available values:Auto
,Lax
,None
,Strict
. Defaults toAuto
. - Secure string
- Configures the Secure attribute on session affinity cookie. Value
Always
indicates the Secure attribute will be set in the Set-Cookie header,Never
indicates the Secure attribute will not be set, andAuto
will set the Secure attribute depending if Always Use HTTPS is enabled. Available values:Auto
,Always
,Never
. Defaults toAuto
. - Zero
Downtime stringFailover - Configures the zero-downtime failover between origins within a pool when session affinity is enabled. Value
none
means no failover takes place for sessions pinned to the origin. Valuetemporary
means traffic will be sent to another other healthy origin until the originally pinned origin is available; note that this can potentially result in heavy origin flapping. Valuesticky
means the session affinity cookie is updated and subsequent requests are sent to the new origin. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. Available values:none
,temporary
,sticky
. Defaults tonone
.
- drain
Duration Integer - Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer. Defaults to
0
. - headers List<String>
- Configures the HTTP header names to use when header session affinity is enabled.
- require
All BooleanHeaders - Configures how headers are used when header session affinity is enabled. Set to true to require all headers to be present on requests in order for sessions to be created or false to require at least one header to be present. Defaults to
false
. - samesite String
- Configures the SameSite attribute on session affinity cookie. Value
Auto
will be translated toLax
orNone
depending if Always Use HTTPS is enabled. Note: when using valueNone
, then you can not setsecure="Never"
. Available values:Auto
,Lax
,None
,Strict
. Defaults toAuto
. - secure String
- Configures the Secure attribute on session affinity cookie. Value
Always
indicates the Secure attribute will be set in the Set-Cookie header,Never
indicates the Secure attribute will not be set, andAuto
will set the Secure attribute depending if Always Use HTTPS is enabled. Available values:Auto
,Always
,Never
. Defaults toAuto
. - zero
Downtime StringFailover - Configures the zero-downtime failover between origins within a pool when session affinity is enabled. Value
none
means no failover takes place for sessions pinned to the origin. Valuetemporary
means traffic will be sent to another other healthy origin until the originally pinned origin is available; note that this can potentially result in heavy origin flapping. Valuesticky
means the session affinity cookie is updated and subsequent requests are sent to the new origin. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. Available values:none
,temporary
,sticky
. Defaults tonone
.
- drain
Duration number - Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer. Defaults to
0
. - headers string[]
- Configures the HTTP header names to use when header session affinity is enabled.
- require
All booleanHeaders - Configures how headers are used when header session affinity is enabled. Set to true to require all headers to be present on requests in order for sessions to be created or false to require at least one header to be present. Defaults to
false
. - samesite string
- Configures the SameSite attribute on session affinity cookie. Value
Auto
will be translated toLax
orNone
depending if Always Use HTTPS is enabled. Note: when using valueNone
, then you can not setsecure="Never"
. Available values:Auto
,Lax
,None
,Strict
. Defaults toAuto
. - secure string
- Configures the Secure attribute on session affinity cookie. Value
Always
indicates the Secure attribute will be set in the Set-Cookie header,Never
indicates the Secure attribute will not be set, andAuto
will set the Secure attribute depending if Always Use HTTPS is enabled. Available values:Auto
,Always
,Never
. Defaults toAuto
. - zero
Downtime stringFailover - Configures the zero-downtime failover between origins within a pool when session affinity is enabled. Value
none
means no failover takes place for sessions pinned to the origin. Valuetemporary
means traffic will be sent to another other healthy origin until the originally pinned origin is available; note that this can potentially result in heavy origin flapping. Valuesticky
means the session affinity cookie is updated and subsequent requests are sent to the new origin. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. Available values:none
,temporary
,sticky
. Defaults tonone
.
- drain_
duration int - Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer. Defaults to
0
. - headers Sequence[str]
- Configures the HTTP header names to use when header session affinity is enabled.
- require_
all_ boolheaders - Configures how headers are used when header session affinity is enabled. Set to true to require all headers to be present on requests in order for sessions to be created or false to require at least one header to be present. Defaults to
false
. - samesite str
- Configures the SameSite attribute on session affinity cookie. Value
Auto
will be translated toLax
orNone
depending if Always Use HTTPS is enabled. Note: when using valueNone
, then you can not setsecure="Never"
. Available values:Auto
,Lax
,None
,Strict
. Defaults toAuto
. - secure str
- Configures the Secure attribute on session affinity cookie. Value
Always
indicates the Secure attribute will be set in the Set-Cookie header,Never
indicates the Secure attribute will not be set, andAuto
will set the Secure attribute depending if Always Use HTTPS is enabled. Available values:Auto
,Always
,Never
. Defaults toAuto
. - zero_
downtime_ strfailover - Configures the zero-downtime failover between origins within a pool when session affinity is enabled. Value
none
means no failover takes place for sessions pinned to the origin. Valuetemporary
means traffic will be sent to another other healthy origin until the originally pinned origin is available; note that this can potentially result in heavy origin flapping. Valuesticky
means the session affinity cookie is updated and subsequent requests are sent to the new origin. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. Available values:none
,temporary
,sticky
. Defaults tonone
.
- drain
Duration Number - Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer. Defaults to
0
. - headers List<String>
- Configures the HTTP header names to use when header session affinity is enabled.
- require
All BooleanHeaders - Configures how headers are used when header session affinity is enabled. Set to true to require all headers to be present on requests in order for sessions to be created or false to require at least one header to be present. Defaults to
false
. - samesite String
- Configures the SameSite attribute on session affinity cookie. Value
Auto
will be translated toLax
orNone
depending if Always Use HTTPS is enabled. Note: when using valueNone
, then you can not setsecure="Never"
. Available values:Auto
,Lax
,None
,Strict
. Defaults toAuto
. - secure String
- Configures the Secure attribute on session affinity cookie. Value
Always
indicates the Secure attribute will be set in the Set-Cookie header,Never
indicates the Secure attribute will not be set, andAuto
will set the Secure attribute depending if Always Use HTTPS is enabled. Available values:Auto
,Always
,Never
. Defaults toAuto
. - zero
Downtime StringFailover - Configures the zero-downtime failover between origins within a pool when session affinity is enabled. Value
none
means no failover takes place for sessions pinned to the origin. Valuetemporary
means traffic will be sent to another other healthy origin until the originally pinned origin is available; note that this can potentially result in heavy origin flapping. Valuesticky
means the session affinity cookie is updated and subsequent requests are sent to the new origin. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. Available values:none
,temporary
,sticky
. Defaults tonone
.
Import
$ pulumi import cloudflare:index/loadBalancer:LoadBalancer example <zone_id>/<load_balancer_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.