Load Balancer Args
Example Usage
resources:
exampleLoadBalancer:
type: cloudflare:LoadBalancer
name: example_load_balancer
properties:
zoneId: 699d98642c564d2e855e9661899b7252
defaultPools:
- 17b5962d775c646f3f9725cbc7a53df4
- 9290f38c5d07c2e2f4df57b1f61d4196
- 00920f38ce07c2e2f4df50b1f61d4194
fallbackPool: fallback_pool
name: www.example.com
adaptiveRouting:
failover_across_pools: true
countryPools:
GB:
- abd90f38ced07c2e2f4df50b1f61d4194
US:
- de90f38ced07c2e2f4df50b1f61d4194
- 00920f38ce07c2e2f4df50b1f61d4194
description: Load Balancer for www.example.com
locationStrategy:
mode: resolver_ip
prefer_ecs: always
networks:
- string
popPools:
LAX:
- de90f38ced07c2e2f4df50b1f61d4194
- 9290f38c5d07c2e2f4df57b1f61d4196
LHR:
- abd90f38ced07c2e2f4df50b1f61d4194
- f9138c5d07c2e2f4df57b1f61d4196
SJC:
- 00920f38ce07c2e2f4df50b1f61d4194
proxied: true
randomSteering:
default_weight: 0.2
pool_weights:
9290f38c5d07c2e2f4df57b1f61d4196: 0.5
de90f38ced07c2e2f4df50b1f61d4194: 0.3
regionPools:
ENAM:
- 00920f38ce07c2e2f4df50b1f61d4194
WNAM:
- de90f38ced07c2e2f4df50b1f61d4194
- 9290f38c5d07c2e2f4df57b1f61d4196
rules:
- condition: http.request.uri.path contains "/testing"
disabled: true
fixed_response:
contentType: application/json
location: www.example.com
messageBody: Testing Hello
statusCode: 0
name: route the path /testing to testing datacenter.
overrides:
adaptiveRouting:
failoverAcrossPools: true
countryPools:
GB:
- abd90f38ced07c2e2f4df50b1f61d4194
US:
- de90f38ced07c2e2f4df50b1f61d4194
- 00920f38ce07c2e2f4df50b1f61d4194
defaultPools:
- 17b5962d775c646f3f9725cbc7a53df4
- 9290f38c5d07c2e2f4df57b1f61d4196
- 00920f38ce07c2e2f4df50b1f61d4194
fallbackPool: fallback_pool
locationStrategy:
mode: resolver_ip
preferEcs: always
popPools:
LAX:
- de90f38ced07c2e2f4df50b1f61d4194
- 9290f38c5d07c2e2f4df57b1f61d4196
LHR:
- abd90f38ced07c2e2f4df50b1f61d4194
- f9138c5d07c2e2f4df57b1f61d4196
SJC:
- 00920f38ce07c2e2f4df50b1f61d4194
randomSteering:
defaultWeight: 0.2
poolWeights:
9290f38c5d07c2e2f4df57b1f61d4196: 0.5
de90f38ced07c2e2f4df50b1f61d4194: 0.3
regionPools:
ENAM:
- 00920f38ce07c2e2f4df50b1f61d4194
WNAM:
- de90f38ced07c2e2f4df50b1f61d4194
- 9290f38c5d07c2e2f4df57b1f61d4196
sessionAffinity: cookie
sessionAffinityAttributes:
drainDuration: 100
headers:
- x
requireAllHeaders: true
samesite: Auto
secure: Auto
zeroDowntimeFailover: sticky
sessionAffinityTtl: 1800
steeringPolicy: dynamic_latency
ttl: 30
priority: 0
terminates: true
sessionAffinity: cookie
sessionAffinityAttributes:
drain_duration: 100
headers:
- x
require_all_headers: true
samesite: Auto
secure: Auto
zero_downtime_failover: sticky
sessionAffinityTtl: 1800
steeringPolicy: dynamic_latency
ttl: 30
Import
$ pulumi import cloudflare:index/loadBalancer:LoadBalancer example '<zone_id>/<load_balancer_id>'
Constructors
Properties
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. For example, zero-downtime failover occurs immediately when an origin becomes unavailable due to HTTP 521, 522, or 523 response codes. If there is another healthy origin in the same pool, the request is retried once against this alternate origin.
A mapping of country codes to a list of pool IDs (ordered by their failover priority) for the given country. Any country not explicitly defined will fall back to using the corresponding regionpool mapping if it exists else to defaultpools.
A list of pool IDs ordered by their failover priority. Pools defined here are used by default, or when region_pools are not configured for a given region.
Object description.
The pool ID to use when all other pools are detected as unhealthy.
Controls location-based steering for non-proxied requests. See steering_policy
to learn how steering is affected.
(Enterprise only): A mapping of Cloudflare PoP identifiers to a list of pool IDs (ordered by their failover priority) for the PoP (datacenter). Any PoPs not explicitly defined will fall back to using the corresponding countrypool, then regionpool mapping if it exists else to default_pools.
Configures pool weights.
A mapping of region codes to a list of pool IDs (ordered by their failover priority) for the given region. Any regions not explicitly defined will fall back to using default_pools.
BETA Field Not General Access: A list of rules for this load balancer to execute.
Specifies the type of session affinity the load balancer should use unless specified as "none"
. The supported types are:
Configures attributes for session affinity.
Time, in seconds, until a client's session expires after being created. Once the expiry time has been reached, subsequent requests may get sent to a different origin server. The accepted ranges per session_affinity
policy are:
Steering Policy for this load balancer.