LoadBalancerArgs

data class LoadBalancerArgs(val adaptiveRouting: Output<LoadBalancerAdaptiveRoutingArgs>? = null, val countryPools: Output<Map<String, List<String>>>? = null, val defaultPools: Output<List<String>>? = null, val description: Output<String>? = null, val enabled: Output<Boolean>? = null, val fallbackPool: Output<String>? = null, val locationStrategy: Output<LoadBalancerLocationStrategyArgs>? = null, val name: Output<String>? = null, val networks: Output<List<String>>? = null, val popPools: Output<Map<String, List<String>>>? = null, val proxied: Output<Boolean>? = null, val randomSteering: Output<LoadBalancerRandomSteeringArgs>? = null, val regionPools: Output<Map<String, List<String>>>? = null, val rules: Output<List<LoadBalancerRuleArgs>>? = null, val sessionAffinity: Output<String>? = null, val sessionAffinityAttributes: Output<LoadBalancerSessionAffinityAttributesArgs>? = null, val sessionAffinityTtl: Output<Double>? = null, val steeringPolicy: Output<String>? = null, val ttl: Output<Double>? = null, val zoneId: Output<String>? = null) : ConvertibleToJava<LoadBalancerArgs>

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: pop
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: pop
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: none
sessionAffinityAttributes:
drainDuration: 100
headers:
- x
requireAllHeaders: true
samesite: Auto
secure: Auto
zeroDowntimeFailover: none
sessionAffinityTtl: 1800
steeringPolicy: off
ttl: 30
priority: 0
terminates: true
sessionAffinity: none
sessionAffinityAttributes:
drain_duration: 100
headers:
- x
require_all_headers: true
samesite: Auto
secure: Auto
zero_downtime_failover: none
sessionAffinityTtl: 1800
steeringPolicy: off
ttl: 30

Import

$ pulumi import cloudflare:index/loadBalancer:LoadBalancer example '<zone_id>/<load_balancer_id>'

Constructors

Link copied to clipboard
constructor(adaptiveRouting: Output<LoadBalancerAdaptiveRoutingArgs>? = null, countryPools: Output<Map<String, List<String>>>? = null, defaultPools: Output<List<String>>? = null, description: Output<String>? = null, enabled: Output<Boolean>? = null, fallbackPool: Output<String>? = null, locationStrategy: Output<LoadBalancerLocationStrategyArgs>? = null, name: Output<String>? = null, networks: Output<List<String>>? = null, popPools: Output<Map<String, List<String>>>? = null, proxied: Output<Boolean>? = null, randomSteering: Output<LoadBalancerRandomSteeringArgs>? = null, regionPools: Output<Map<String, List<String>>>? = null, rules: Output<List<LoadBalancerRuleArgs>>? = null, sessionAffinity: Output<String>? = null, sessionAffinityAttributes: Output<LoadBalancerSessionAffinityAttributesArgs>? = null, sessionAffinityTtl: Output<Double>? = null, steeringPolicy: Output<String>? = null, ttl: Output<Double>? = null, zoneId: Output<String>? = null)

Properties

Link copied to clipboard

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.

Link copied to clipboard
val countryPools: Output<Map<String, List<String>>>? = null

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.

Link copied to clipboard
val defaultPools: Output<List<String>>? = null

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.

Link copied to clipboard
val description: Output<String>? = null

Object description.

Link copied to clipboard
val enabled: Output<Boolean>? = null

Whether to enable (the default) this load balancer.

Link copied to clipboard
val fallbackPool: Output<String>? = null

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

Link copied to clipboard

Controls location-based steering for non-proxied requests. See steering_policy to learn how steering is affected.

Link copied to clipboard
val name: Output<String>? = null

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.

Link copied to clipboard
val networks: Output<List<String>>? = null

List of networks where Load Balancer or Pool is enabled.

Link copied to clipboard
val popPools: Output<Map<String, List<String>>>? = null

(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.

Link copied to clipboard
val proxied: Output<Boolean>? = null

Whether the hostname should be gray clouded (false) or orange clouded (true).

Link copied to clipboard

Configures pool weights.

Link copied to clipboard
val regionPools: Output<Map<String, List<String>>>? = null

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.

Link copied to clipboard
val rules: Output<List<LoadBalancerRuleArgs>>? = null

BETA Field Not General Access: A list of rules for this load balancer to execute.

Link copied to clipboard
val sessionAffinity: Output<String>? = null

Specifies the type of session affinity the load balancer should use unless specified as "none". The supported types are:

Link copied to clipboard

Configures attributes for session affinity.

Link copied to clipboard
val sessionAffinityTtl: Output<Double>? = null

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:

Link copied to clipboard
val steeringPolicy: Output<String>? = null

Steering Policy for this load balancer.

Link copied to clipboard
val ttl: Output<Double>? = null

Time to live (TTL) of the DNS entry for the IP address returned by this load balancer. This only applies to gray-clouded (unproxied) load balancers.

Link copied to clipboard
val zoneId: Output<String>? = null

Functions

Link copied to clipboard
open override fun toJava(): LoadBalancerArgs