1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. LoadBalancer
Cloudflare v6.0.1 published on Wednesday, Apr 16, 2025 by Pulumi

cloudflare.LoadBalancer

Explore with Pulumi AI

Example Usage

Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
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
Copy

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: Optional[str] = None,
                 zone_id: Optional[str] = None,
                 default_pools: Optional[Sequence[str]] = None,
                 name: Optional[str] = None,
                 proxied: Optional[bool] = None,
                 random_steering: Optional[LoadBalancerRandomSteeringArgs] = None,
                 location_strategy: Optional[LoadBalancerLocationStrategyArgs] = None,
                 description: Optional[str] = None,
                 networks: Optional[Sequence[str]] = None,
                 pop_pools: Optional[Mapping[str, Sequence[str]]] = None,
                 adaptive_routing: Optional[LoadBalancerAdaptiveRoutingArgs] = None,
                 enabled: Optional[bool] = None,
                 region_pools: Optional[Mapping[str, Sequence[str]]] = None,
                 rules: Optional[Sequence[LoadBalancerRuleArgs]] = None,
                 session_affinity: Optional[str] = None,
                 session_affinity_attributes: Optional[LoadBalancerSessionAffinityAttributesArgs] = None,
                 session_affinity_ttl: Optional[float] = None,
                 steering_policy: Optional[str] = None,
                 ttl: Optional[float] = None,
                 country_pools: Optional[Mapping[str, Sequence[str]]] = 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 This property is required. string
The unique name of the resource.
args This property is required. LoadBalancerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. LoadBalancerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. LoadBalancerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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()
{
    FallbackPool = "string",
    ZoneId = "string",
    DefaultPools = new[]
    {
        "string",
    },
    Name = "string",
    Proxied = false,
    RandomSteering = new Cloudflare.Inputs.LoadBalancerRandomSteeringArgs
    {
        DefaultWeight = 0,
        PoolWeights = 
        {
            { "string", 0 },
        },
    },
    LocationStrategy = new Cloudflare.Inputs.LoadBalancerLocationStrategyArgs
    {
        Mode = "string",
        PreferEcs = "string",
    },
    Description = "string",
    Networks = new[]
    {
        "string",
    },
    PopPools = 
    {
        { "string", new[]
        {
            "string",
        } },
    },
    AdaptiveRouting = new Cloudflare.Inputs.LoadBalancerAdaptiveRoutingArgs
    {
        FailoverAcrossPools = false,
    },
    Enabled = false,
    RegionPools = 
    {
        { "string", new[]
        {
            "string",
        } },
    },
    Rules = new[]
    {
        new Cloudflare.Inputs.LoadBalancerRuleArgs
        {
            Condition = "string",
            Disabled = false,
            FixedResponse = new Cloudflare.Inputs.LoadBalancerRuleFixedResponseArgs
            {
                ContentType = "string",
                Location = "string",
                MessageBody = "string",
                StatusCode = 0,
            },
            Name = "string",
            Overrides = new Cloudflare.Inputs.LoadBalancerRuleOverridesArgs
            {
                AdaptiveRouting = new Cloudflare.Inputs.LoadBalancerRuleOverridesAdaptiveRoutingArgs
                {
                    FailoverAcrossPools = false,
                },
                CountryPools = 
                {
                    { "string", new[]
                    {
                        "string",
                    } },
                },
                DefaultPools = new[]
                {
                    "string",
                },
                FallbackPool = "string",
                LocationStrategy = new Cloudflare.Inputs.LoadBalancerRuleOverridesLocationStrategyArgs
                {
                    Mode = "string",
                    PreferEcs = "string",
                },
                PopPools = 
                {
                    { "string", new[]
                    {
                        "string",
                    } },
                },
                RandomSteering = new Cloudflare.Inputs.LoadBalancerRuleOverridesRandomSteeringArgs
                {
                    DefaultWeight = 0,
                    PoolWeights = 
                    {
                        { "string", 0 },
                    },
                },
                RegionPools = 
                {
                    { "string", new[]
                    {
                        "string",
                    } },
                },
                SessionAffinity = "string",
                SessionAffinityAttributes = new Cloudflare.Inputs.LoadBalancerRuleOverridesSessionAffinityAttributesArgs
                {
                    DrainDuration = 0,
                    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 Cloudflare.Inputs.LoadBalancerSessionAffinityAttributesArgs
    {
        DrainDuration = 0,
        Headers = new[]
        {
            "string",
        },
        RequireAllHeaders = false,
        Samesite = "string",
        Secure = "string",
        ZeroDowntimeFailover = "string",
    },
    SessionAffinityTtl = 0,
    SteeringPolicy = "string",
    Ttl = 0,
    CountryPools = 
    {
        { "string", new[]
        {
            "string",
        } },
    },
});
Copy
example, err := cloudflare.NewLoadBalancer(ctx, "loadBalancerResource", &cloudflare.LoadBalancerArgs{
	FallbackPool: pulumi.String("string"),
	ZoneId:       pulumi.String("string"),
	DefaultPools: pulumi.StringArray{
		pulumi.String("string"),
	},
	Name:    pulumi.String("string"),
	Proxied: pulumi.Bool(false),
	RandomSteering: &cloudflare.LoadBalancerRandomSteeringArgs{
		DefaultWeight: pulumi.Float64(0),
		PoolWeights: pulumi.Float64Map{
			"string": pulumi.Float64(0),
		},
	},
	LocationStrategy: &cloudflare.LoadBalancerLocationStrategyArgs{
		Mode:      pulumi.String("string"),
		PreferEcs: pulumi.String("string"),
	},
	Description: pulumi.String("string"),
	Networks: pulumi.StringArray{
		pulumi.String("string"),
	},
	PopPools: pulumi.StringArrayMap{
		"string": pulumi.StringArray{
			pulumi.String("string"),
		},
	},
	AdaptiveRouting: &cloudflare.LoadBalancerAdaptiveRoutingArgs{
		FailoverAcrossPools: pulumi.Bool(false),
	},
	Enabled: pulumi.Bool(false),
	RegionPools: pulumi.StringArrayMap{
		"string": pulumi.StringArray{
			pulumi.String("string"),
		},
	},
	Rules: cloudflare.LoadBalancerRuleArray{
		&cloudflare.LoadBalancerRuleArgs{
			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),
			},
			Name: pulumi.String("string"),
			Overrides: &cloudflare.LoadBalancerRuleOverridesArgs{
				AdaptiveRouting: &cloudflare.LoadBalancerRuleOverridesAdaptiveRoutingArgs{
					FailoverAcrossPools: pulumi.Bool(false),
				},
				CountryPools: pulumi.StringArrayMap{
					"string": pulumi.StringArray{
						pulumi.String("string"),
					},
				},
				DefaultPools: pulumi.StringArray{
					pulumi.String("string"),
				},
				FallbackPool: pulumi.String("string"),
				LocationStrategy: &cloudflare.LoadBalancerRuleOverridesLocationStrategyArgs{
					Mode:      pulumi.String("string"),
					PreferEcs: pulumi.String("string"),
				},
				PopPools: pulumi.StringArrayMap{
					"string": pulumi.StringArray{
						pulumi.String("string"),
					},
				},
				RandomSteering: &cloudflare.LoadBalancerRuleOverridesRandomSteeringArgs{
					DefaultWeight: pulumi.Float64(0),
					PoolWeights: pulumi.Float64Map{
						"string": pulumi.Float64(0),
					},
				},
				RegionPools: pulumi.StringArrayMap{
					"string": pulumi.StringArray{
						pulumi.String("string"),
					},
				},
				SessionAffinity: pulumi.String("string"),
				SessionAffinityAttributes: &cloudflare.LoadBalancerRuleOverridesSessionAffinityAttributesArgs{
					DrainDuration: pulumi.Float64(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.Float64(0),
				SteeringPolicy:     pulumi.String("string"),
				Ttl:                pulumi.Float64(0),
			},
			Priority:   pulumi.Int(0),
			Terminates: pulumi.Bool(false),
		},
	},
	SessionAffinity: pulumi.String("string"),
	SessionAffinityAttributes: &cloudflare.LoadBalancerSessionAffinityAttributesArgs{
		DrainDuration: pulumi.Float64(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.Float64(0),
	SteeringPolicy:     pulumi.String("string"),
	Ttl:                pulumi.Float64(0),
	CountryPools: pulumi.StringArrayMap{
		"string": pulumi.StringArray{
			pulumi.String("string"),
		},
	},
})
Copy
var loadBalancerResource = new LoadBalancer("loadBalancerResource", LoadBalancerArgs.builder()
    .fallbackPool("string")
    .zoneId("string")
    .defaultPools("string")
    .name("string")
    .proxied(false)
    .randomSteering(LoadBalancerRandomSteeringArgs.builder()
        .defaultWeight(0)
        .poolWeights(Map.of("string", 0))
        .build())
    .locationStrategy(LoadBalancerLocationStrategyArgs.builder()
        .mode("string")
        .preferEcs("string")
        .build())
    .description("string")
    .networks("string")
    .popPools(Map.of("string", "string"))
    .adaptiveRouting(LoadBalancerAdaptiveRoutingArgs.builder()
        .failoverAcrossPools(false)
        .build())
    .enabled(false)
    .regionPools(Map.of("string", "string"))
    .rules(LoadBalancerRuleArgs.builder()
        .condition("string")
        .disabled(false)
        .fixedResponse(LoadBalancerRuleFixedResponseArgs.builder()
            .contentType("string")
            .location("string")
            .messageBody("string")
            .statusCode(0)
            .build())
        .name("string")
        .overrides(LoadBalancerRuleOverridesArgs.builder()
            .adaptiveRouting(LoadBalancerRuleOverridesAdaptiveRoutingArgs.builder()
                .failoverAcrossPools(false)
                .build())
            .countryPools(Map.of("string", "string"))
            .defaultPools("string")
            .fallbackPool("string")
            .locationStrategy(LoadBalancerRuleOverridesLocationStrategyArgs.builder()
                .mode("string")
                .preferEcs("string")
                .build())
            .popPools(Map.of("string", "string"))
            .randomSteering(LoadBalancerRuleOverridesRandomSteeringArgs.builder()
                .defaultWeight(0)
                .poolWeights(Map.of("string", 0))
                .build())
            .regionPools(Map.of("string", "string"))
            .sessionAffinity("string")
            .sessionAffinityAttributes(LoadBalancerRuleOverridesSessionAffinityAttributesArgs.builder()
                .drainDuration(0)
                .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(LoadBalancerSessionAffinityAttributesArgs.builder()
        .drainDuration(0)
        .headers("string")
        .requireAllHeaders(false)
        .samesite("string")
        .secure("string")
        .zeroDowntimeFailover("string")
        .build())
    .sessionAffinityTtl(0)
    .steeringPolicy("string")
    .ttl(0)
    .countryPools(Map.of("string", "string"))
    .build());
Copy
load_balancer_resource = cloudflare.LoadBalancer("loadBalancerResource",
    fallback_pool="string",
    zone_id="string",
    default_pools=["string"],
    name="string",
    proxied=False,
    random_steering={
        "default_weight": 0,
        "pool_weights": {
            "string": 0,
        },
    },
    location_strategy={
        "mode": "string",
        "prefer_ecs": "string",
    },
    description="string",
    networks=["string"],
    pop_pools={
        "string": ["string"],
    },
    adaptive_routing={
        "failover_across_pools": False,
    },
    enabled=False,
    region_pools={
        "string": ["string"],
    },
    rules=[{
        "condition": "string",
        "disabled": False,
        "fixed_response": {
            "content_type": "string",
            "location": "string",
            "message_body": "string",
            "status_code": 0,
        },
        "name": "string",
        "overrides": {
            "adaptive_routing": {
                "failover_across_pools": False,
            },
            "country_pools": {
                "string": ["string"],
            },
            "default_pools": ["string"],
            "fallback_pool": "string",
            "location_strategy": {
                "mode": "string",
                "prefer_ecs": "string",
            },
            "pop_pools": {
                "string": ["string"],
            },
            "random_steering": {
                "default_weight": 0,
                "pool_weights": {
                    "string": 0,
                },
            },
            "region_pools": {
                "string": ["string"],
            },
            "session_affinity": "string",
            "session_affinity_attributes": {
                "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,
        },
        "priority": 0,
        "terminates": False,
    }],
    session_affinity="string",
    session_affinity_attributes={
        "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={
        "string": ["string"],
    })
Copy
const loadBalancerResource = new cloudflare.LoadBalancer("loadBalancerResource", {
    fallbackPool: "string",
    zoneId: "string",
    defaultPools: ["string"],
    name: "string",
    proxied: false,
    randomSteering: {
        defaultWeight: 0,
        poolWeights: {
            string: 0,
        },
    },
    locationStrategy: {
        mode: "string",
        preferEcs: "string",
    },
    description: "string",
    networks: ["string"],
    popPools: {
        string: ["string"],
    },
    adaptiveRouting: {
        failoverAcrossPools: false,
    },
    enabled: false,
    regionPools: {
        string: ["string"],
    },
    rules: [{
        condition: "string",
        disabled: false,
        fixedResponse: {
            contentType: "string",
            location: "string",
            messageBody: "string",
            statusCode: 0,
        },
        name: "string",
        overrides: {
            adaptiveRouting: {
                failoverAcrossPools: false,
            },
            countryPools: {
                string: ["string"],
            },
            defaultPools: ["string"],
            fallbackPool: "string",
            locationStrategy: {
                mode: "string",
                preferEcs: "string",
            },
            popPools: {
                string: ["string"],
            },
            randomSteering: {
                defaultWeight: 0,
                poolWeights: {
                    string: 0,
                },
            },
            regionPools: {
                string: ["string"],
            },
            sessionAffinity: "string",
            sessionAffinityAttributes: {
                drainDuration: 0,
                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: {
        string: ["string"],
    },
});
Copy
type: cloudflare:LoadBalancer
properties:
    adaptiveRouting:
        failoverAcrossPools: false
    countryPools:
        string:
            - string
    defaultPools:
        - string
    description: string
    enabled: false
    fallbackPool: string
    locationStrategy:
        mode: string
        preferEcs: string
    name: string
    networks:
        - string
    popPools:
        string:
            - string
    proxied: false
    randomSteering:
        defaultWeight: 0
        poolWeights:
            string: 0
    regionPools:
        string:
            - string
    rules:
        - condition: string
          disabled: false
          fixedResponse:
            contentType: string
            location: string
            messageBody: string
            statusCode: 0
          name: string
          overrides:
            adaptiveRouting:
                failoverAcrossPools: false
            countryPools:
                string:
                    - string
            defaultPools:
                - string
            fallbackPool: string
            locationStrategy:
                mode: string
                preferEcs: string
            popPools:
                string:
                    - string
            randomSteering:
                defaultWeight: 0
                poolWeights:
                    string: 0
            regionPools:
                string:
                    - string
            sessionAffinity: string
            sessionAffinityAttributes:
                drainDuration: 0
                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
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The LoadBalancer resource accepts the following input properties:

DefaultPools This property is required. List<string>
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.
FallbackPool This property is required. string
The pool ID to use when all other pools are detected as unhealthy.
Name This property is required. 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.
ZoneId This property is required. string
AdaptiveRouting LoadBalancerAdaptiveRouting
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.
CountryPools Dictionary<string, ImmutableArray<string>>
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.
Description string
Object description.
Enabled bool
Whether to enable (the default) this load balancer.
LocationStrategy LoadBalancerLocationStrategy
Controls location-based steering for non-proxied requests. See steering_policy to learn how steering is affected.
Networks List<string>
List of networks where Load Balancer or Pool is enabled.
PopPools Dictionary<string, ImmutableArray<string>>
(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.
Proxied bool
Whether the hostname should be gray clouded (false) or orange clouded (true).
RandomSteering LoadBalancerRandomSteering
Configures pool weights.
RegionPools Dictionary<string, ImmutableArray<string>>
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.
Rules List<LoadBalancerRule>
BETA Field Not General Access: A list of rules for this load balancer to execute.
SessionAffinity string
Specifies the type of session affinity the load balancer should use unless specified as "none". The supported types are:
SessionAffinityAttributes LoadBalancerSessionAffinityAttributes
Configures attributes for session affinity.
SessionAffinityTtl double
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:
SteeringPolicy string
Steering Policy for this load balancer.
Ttl double
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.
DefaultPools This property is required. []string
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.
FallbackPool This property is required. string
The pool ID to use when all other pools are detected as unhealthy.
Name This property is required. 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.
ZoneId This property is required. string
AdaptiveRouting LoadBalancerAdaptiveRoutingArgs
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.
CountryPools map[string][]string
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.
Description string
Object description.
Enabled bool
Whether to enable (the default) this load balancer.
LocationStrategy LoadBalancerLocationStrategyArgs
Controls location-based steering for non-proxied requests. See steering_policy to learn how steering is affected.
Networks []string
List of networks where Load Balancer or Pool is enabled.
PopPools map[string][]string
(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.
Proxied bool
Whether the hostname should be gray clouded (false) or orange clouded (true).
RandomSteering LoadBalancerRandomSteeringArgs
Configures pool weights.
RegionPools map[string][]string
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.
Rules []LoadBalancerRuleArgs
BETA Field Not General Access: A list of rules for this load balancer to execute.
SessionAffinity string
Specifies the type of session affinity the load balancer should use unless specified as "none". The supported types are:
SessionAffinityAttributes LoadBalancerSessionAffinityAttributesArgs
Configures attributes for session affinity.
SessionAffinityTtl float64
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:
SteeringPolicy string
Steering Policy for this load balancer.
Ttl float64
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.
defaultPools This property is required. List<String>
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.
fallbackPool This property is required. String
The pool ID to use when all other pools are detected as unhealthy.
name This property is required. 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.
zoneId This property is required. String
adaptiveRouting LoadBalancerAdaptiveRouting
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.
countryPools Map<String,List<String>>
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.
description String
Object description.
enabled Boolean
Whether to enable (the default) this load balancer.
locationStrategy LoadBalancerLocationStrategy
Controls location-based steering for non-proxied requests. See steering_policy to learn how steering is affected.
networks List<String>
List of networks where Load Balancer or Pool is enabled.
popPools Map<String,List<String>>
(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.
proxied Boolean
Whether the hostname should be gray clouded (false) or orange clouded (true).
randomSteering LoadBalancerRandomSteering
Configures pool weights.
regionPools Map<String,List<String>>
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.
rules List<LoadBalancerRule>
BETA Field Not General Access: A list of rules for this load balancer to execute.
sessionAffinity String
Specifies the type of session affinity the load balancer should use unless specified as "none". The supported types are:
sessionAffinityAttributes LoadBalancerSessionAffinityAttributes
Configures attributes for session affinity.
sessionAffinityTtl Double
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:
steeringPolicy String
Steering Policy for this load balancer.
ttl Double
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.
defaultPools This property is required. string[]
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.
fallbackPool This property is required. string
The pool ID to use when all other pools are detected as unhealthy.
name This property is required. 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.
zoneId This property is required. string
adaptiveRouting LoadBalancerAdaptiveRouting
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.
countryPools {[key: string]: string[]}
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.
description string
Object description.
enabled boolean
Whether to enable (the default) this load balancer.
locationStrategy LoadBalancerLocationStrategy
Controls location-based steering for non-proxied requests. See steering_policy to learn how steering is affected.
networks string[]
List of networks where Load Balancer or Pool is enabled.
popPools {[key: string]: string[]}
(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.
proxied boolean
Whether the hostname should be gray clouded (false) or orange clouded (true).
randomSteering LoadBalancerRandomSteering
Configures pool weights.
regionPools {[key: string]: string[]}
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.
rules LoadBalancerRule[]
BETA Field Not General Access: A list of rules for this load balancer to execute.
sessionAffinity string
Specifies the type of session affinity the load balancer should use unless specified as "none". The supported types are:
sessionAffinityAttributes LoadBalancerSessionAffinityAttributes
Configures attributes for session affinity.
sessionAffinityTtl number
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:
steeringPolicy string
Steering Policy for this load balancer.
ttl number
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.
default_pools This property is required. Sequence[str]
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.
fallback_pool This property is required. str
The pool ID to use when all other pools are detected as unhealthy.
name This property is required. 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 This property is required. str
adaptive_routing LoadBalancerAdaptiveRoutingArgs
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.
country_pools Mapping[str, Sequence[str]]
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.
description str
Object description.
enabled bool
Whether to enable (the default) this load balancer.
location_strategy LoadBalancerLocationStrategyArgs
Controls location-based steering for non-proxied requests. See steering_policy to learn how steering is affected.
networks Sequence[str]
List of networks where Load Balancer or Pool is enabled.
pop_pools Mapping[str, Sequence[str]]
(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.
proxied bool
Whether the hostname should be gray clouded (false) or orange clouded (true).
random_steering LoadBalancerRandomSteeringArgs
Configures pool weights.
region_pools Mapping[str, Sequence[str]]
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.
rules Sequence[LoadBalancerRuleArgs]
BETA Field Not General Access: 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". The supported types are:
session_affinity_attributes LoadBalancerSessionAffinityAttributesArgs
Configures attributes for session affinity.
session_affinity_ttl float
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 str
Steering Policy for this load balancer.
ttl float
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.
defaultPools This property is required. List<String>
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.
fallbackPool This property is required. String
The pool ID to use when all other pools are detected as unhealthy.
name This property is required. 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.
zoneId This property is required. String
adaptiveRouting 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. 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.
countryPools Map<List<String>>
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.
description String
Object description.
enabled Boolean
Whether to enable (the default) this load balancer.
locationStrategy Property Map
Controls location-based steering for non-proxied requests. See steering_policy to learn how steering is affected.
networks List<String>
List of networks where Load Balancer or Pool is enabled.
popPools Map<List<String>>
(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.
proxied Boolean
Whether the hostname should be gray clouded (false) or orange clouded (true).
randomSteering Property Map
Configures pool weights.
regionPools Map<List<String>>
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.
rules List<Property Map>
BETA Field Not General Access: A list of rules for this load balancer to execute.
sessionAffinity String
Specifies the type of session affinity the load balancer should use unless specified as "none". The supported types are:
sessionAffinityAttributes Property Map
Configures attributes for session affinity.
sessionAffinityTtl Number
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:
steeringPolicy String
Steering Policy for this load balancer.
ttl Number
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.

Outputs

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

CreatedOn string
Id string
The provider-assigned unique ID for this managed resource.
ModifiedOn string
ZoneName string
CreatedOn string
Id string
The provider-assigned unique ID for this managed resource.
ModifiedOn string
ZoneName string
createdOn String
id String
The provider-assigned unique ID for this managed resource.
modifiedOn String
zoneName String
createdOn string
id string
The provider-assigned unique ID for this managed resource.
modifiedOn string
zoneName string
created_on str
id str
The provider-assigned unique ID for this managed resource.
modified_on str
zone_name str
createdOn String
id String
The provider-assigned unique ID for this managed resource.
modifiedOn String
zoneName String

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_routing: Optional[LoadBalancerAdaptiveRoutingArgs] = None,
        country_pools: Optional[Mapping[str, Sequence[str]]] = None,
        created_on: Optional[str] = None,
        default_pools: Optional[Sequence[str]] = None,
        description: Optional[str] = None,
        enabled: Optional[bool] = None,
        fallback_pool: Optional[str] = None,
        location_strategy: Optional[LoadBalancerLocationStrategyArgs] = None,
        modified_on: Optional[str] = None,
        name: Optional[str] = None,
        networks: Optional[Sequence[str]] = None,
        pop_pools: Optional[Mapping[str, Sequence[str]]] = None,
        proxied: Optional[bool] = None,
        random_steering: Optional[LoadBalancerRandomSteeringArgs] = None,
        region_pools: Optional[Mapping[str, Sequence[str]]] = None,
        rules: Optional[Sequence[LoadBalancerRuleArgs]] = None,
        session_affinity: Optional[str] = None,
        session_affinity_attributes: Optional[LoadBalancerSessionAffinityAttributesArgs] = None,
        session_affinity_ttl: Optional[float] = None,
        steering_policy: Optional[str] = None,
        ttl: Optional[float] = None,
        zone_id: Optional[str] = None,
        zone_name: 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)
resources:  _:    type: cloudflare:LoadBalancer    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AdaptiveRouting LoadBalancerAdaptiveRouting
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.
CountryPools Dictionary<string, ImmutableArray<string>>
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.
CreatedOn string
DefaultPools List<string>
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.
Description string
Object description.
Enabled bool
Whether to enable (the default) this load balancer.
FallbackPool string
The pool ID to use when all other pools are detected as unhealthy.
LocationStrategy LoadBalancerLocationStrategy
Controls location-based steering for non-proxied requests. See steering_policy to learn how steering is affected.
ModifiedOn string
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.
Networks List<string>
List of networks where Load Balancer or Pool is enabled.
PopPools Dictionary<string, ImmutableArray<string>>
(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.
Proxied bool
Whether the hostname should be gray clouded (false) or orange clouded (true).
RandomSteering LoadBalancerRandomSteering
Configures pool weights.
RegionPools Dictionary<string, ImmutableArray<string>>
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.
Rules List<LoadBalancerRule>
BETA Field Not General Access: A list of rules for this load balancer to execute.
SessionAffinity string
Specifies the type of session affinity the load balancer should use unless specified as "none". The supported types are:
SessionAffinityAttributes LoadBalancerSessionAffinityAttributes
Configures attributes for session affinity.
SessionAffinityTtl double
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:
SteeringPolicy string
Steering Policy for this load balancer.
Ttl double
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.
ZoneId string
ZoneName string
AdaptiveRouting LoadBalancerAdaptiveRoutingArgs
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.
CountryPools map[string][]string
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.
CreatedOn string
DefaultPools []string
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.
Description string
Object description.
Enabled bool
Whether to enable (the default) this load balancer.
FallbackPool string
The pool ID to use when all other pools are detected as unhealthy.
LocationStrategy LoadBalancerLocationStrategyArgs
Controls location-based steering for non-proxied requests. See steering_policy to learn how steering is affected.
ModifiedOn string
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.
Networks []string
List of networks where Load Balancer or Pool is enabled.
PopPools map[string][]string
(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.
Proxied bool
Whether the hostname should be gray clouded (false) or orange clouded (true).
RandomSteering LoadBalancerRandomSteeringArgs
Configures pool weights.
RegionPools map[string][]string
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.
Rules []LoadBalancerRuleArgs
BETA Field Not General Access: A list of rules for this load balancer to execute.
SessionAffinity string
Specifies the type of session affinity the load balancer should use unless specified as "none". The supported types are:
SessionAffinityAttributes LoadBalancerSessionAffinityAttributesArgs
Configures attributes for session affinity.
SessionAffinityTtl float64
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:
SteeringPolicy string
Steering Policy for this load balancer.
Ttl float64
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.
ZoneId string
ZoneName string
adaptiveRouting LoadBalancerAdaptiveRouting
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.
countryPools Map<String,List<String>>
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.
createdOn String
defaultPools List<String>
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.
description String
Object description.
enabled Boolean
Whether to enable (the default) this load balancer.
fallbackPool String
The pool ID to use when all other pools are detected as unhealthy.
locationStrategy LoadBalancerLocationStrategy
Controls location-based steering for non-proxied requests. See steering_policy to learn how steering is affected.
modifiedOn String
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.
networks List<String>
List of networks where Load Balancer or Pool is enabled.
popPools Map<String,List<String>>
(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.
proxied Boolean
Whether the hostname should be gray clouded (false) or orange clouded (true).
randomSteering LoadBalancerRandomSteering
Configures pool weights.
regionPools Map<String,List<String>>
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.
rules List<LoadBalancerRule>
BETA Field Not General Access: A list of rules for this load balancer to execute.
sessionAffinity String
Specifies the type of session affinity the load balancer should use unless specified as "none". The supported types are:
sessionAffinityAttributes LoadBalancerSessionAffinityAttributes
Configures attributes for session affinity.
sessionAffinityTtl Double
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:
steeringPolicy String
Steering Policy for this load balancer.
ttl Double
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.
zoneId String
zoneName String
adaptiveRouting LoadBalancerAdaptiveRouting
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.
countryPools {[key: string]: string[]}
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.
createdOn string
defaultPools string[]
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.
description string
Object description.
enabled boolean
Whether to enable (the default) this load balancer.
fallbackPool string
The pool ID to use when all other pools are detected as unhealthy.
locationStrategy LoadBalancerLocationStrategy
Controls location-based steering for non-proxied requests. See steering_policy to learn how steering is affected.
modifiedOn string
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.
networks string[]
List of networks where Load Balancer or Pool is enabled.
popPools {[key: string]: string[]}
(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.
proxied boolean
Whether the hostname should be gray clouded (false) or orange clouded (true).
randomSteering LoadBalancerRandomSteering
Configures pool weights.
regionPools {[key: string]: string[]}
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.
rules LoadBalancerRule[]
BETA Field Not General Access: A list of rules for this load balancer to execute.
sessionAffinity string
Specifies the type of session affinity the load balancer should use unless specified as "none". The supported types are:
sessionAffinityAttributes LoadBalancerSessionAffinityAttributes
Configures attributes for session affinity.
sessionAffinityTtl number
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:
steeringPolicy string
Steering Policy for this load balancer.
ttl number
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.
zoneId string
zoneName string
adaptive_routing LoadBalancerAdaptiveRoutingArgs
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.
country_pools Mapping[str, Sequence[str]]
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.
created_on str
default_pools Sequence[str]
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.
description str
Object description.
enabled bool
Whether to enable (the default) this load balancer.
fallback_pool str
The pool ID to use when all other pools are detected as unhealthy.
location_strategy LoadBalancerLocationStrategyArgs
Controls location-based steering for non-proxied requests. See steering_policy to learn how steering is affected.
modified_on str
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.
networks Sequence[str]
List of networks where Load Balancer or Pool is enabled.
pop_pools Mapping[str, Sequence[str]]
(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.
proxied bool
Whether the hostname should be gray clouded (false) or orange clouded (true).
random_steering LoadBalancerRandomSteeringArgs
Configures pool weights.
region_pools Mapping[str, Sequence[str]]
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.
rules Sequence[LoadBalancerRuleArgs]
BETA Field Not General Access: 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". The supported types are:
session_affinity_attributes LoadBalancerSessionAffinityAttributesArgs
Configures attributes for session affinity.
session_affinity_ttl float
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 str
Steering Policy for this load balancer.
ttl float
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.
zone_id str
zone_name str
adaptiveRouting 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. 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.
countryPools Map<List<String>>
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.
createdOn String
defaultPools List<String>
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.
description String
Object description.
enabled Boolean
Whether to enable (the default) this load balancer.
fallbackPool String
The pool ID to use when all other pools are detected as unhealthy.
locationStrategy Property Map
Controls location-based steering for non-proxied requests. See steering_policy to learn how steering is affected.
modifiedOn String
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.
networks List<String>
List of networks where Load Balancer or Pool is enabled.
popPools Map<List<String>>
(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.
proxied Boolean
Whether the hostname should be gray clouded (false) or orange clouded (true).
randomSteering Property Map
Configures pool weights.
regionPools Map<List<String>>
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.
rules List<Property Map>
BETA Field Not General Access: A list of rules for this load balancer to execute.
sessionAffinity String
Specifies the type of session affinity the load balancer should use unless specified as "none". The supported types are:
sessionAffinityAttributes Property Map
Configures attributes for session affinity.
sessionAffinityTtl Number
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:
steeringPolicy String
Steering Policy for this load balancer.
ttl Number
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.
zoneId String
zoneName String

Supporting Types

LoadBalancerAdaptiveRouting
, LoadBalancerAdaptiveRoutingArgs

FailoverAcrossPools bool
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 (the default) zero-downtime failover will only occur between origins within the same pool. See session_affinity_attributes for control over when sessions are broken or reassigned.
FailoverAcrossPools bool
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 (the default) zero-downtime failover will only occur between origins within the same pool. See session_affinity_attributes for control over when sessions are broken or reassigned.
failoverAcrossPools Boolean
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 (the default) zero-downtime failover will only occur between origins within the same pool. See session_affinity_attributes for control over when sessions are broken or reassigned.
failoverAcrossPools boolean
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 (the default) zero-downtime failover will only occur between origins within the same pool. See session_affinity_attributes for control over when sessions are broken or reassigned.
failover_across_pools bool
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 (the default) zero-downtime failover will only occur between origins within the same pool. See session_affinity_attributes for control over when sessions are broken or reassigned.
failoverAcrossPools Boolean
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 (the default) zero-downtime failover will only occur between origins within the same pool. See session_affinity_attributes for control over when sessions are broken or reassigned.

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.
PreferEcs string
Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location.
Mode string
Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful.
PreferEcs string
Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location.
mode String
Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful.
preferEcs String
Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location.
mode string
Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful.
preferEcs string
Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location.
mode str
Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful.
prefer_ecs str
Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location.
mode String
Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful.
preferEcs String
Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location.

LoadBalancerRandomSteering
, LoadBalancerRandomSteeringArgs

DefaultWeight double
The default weight for pools in the load balancer that are not specified in the pool_weights map.
PoolWeights Dictionary<string, double>
A mapping of pool IDs to custom weights. The weight is relative to other pools in the load balancer.
DefaultWeight float64
The default weight for pools in the load balancer that are not specified in the pool_weights map.
PoolWeights map[string]float64
A mapping of pool IDs to custom weights. The weight is relative to other pools in the load balancer.
defaultWeight Double
The default weight for pools in the load balancer that are not specified in the pool_weights map.
poolWeights Map<String,Double>
A mapping of pool IDs to custom weights. The weight is relative to other pools in the load balancer.
defaultWeight number
The default weight for pools in the load balancer that are not specified in the pool_weights map.
poolWeights {[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.
defaultWeight Number
The default weight for pools in the load balancer that are not specified in the pool_weights map.
poolWeights Map<Number>
A mapping of pool IDs to custom weights. The weight is relative to other pools in the load balancer.

LoadBalancerRule
, LoadBalancerRuleArgs

Condition string
The condition expressions to evaluate. If the condition evaluates to true, the overrides or fixed_response in this rule will be applied. An empty condition is always true. For more details on condition expressions, please see https://developers.cloudflare.com/load-balancing/understand-basics/load-balancing-rules/expressions.
Disabled bool
Disable this specific rule. It will no longer be evaluated by this load balancer.
FixedResponse LoadBalancerRuleFixedResponse
A collection of fields used to directly respond to the eyeball instead of routing to a pool. If a fixed*response is supplied the rule will be marked as terminates.
Name string
Name of this rule. Only used for human readability.
Overrides LoadBalancerRuleOverrides
A collection of overrides to apply to the load balancer when this rule's condition is true. All fields are optional.
Priority int
The order in which rules should be executed in relation to each other. Lower values are executed first. Values do not need to be sequential. If no value is provided for any rule the array order of the rules field will be used to assign a priority.
Terminates bool
If this rule's condition is true, this causes rule evaluation to stop after processing this rule.
Condition string
The condition expressions to evaluate. If the condition evaluates to true, the overrides or fixed_response in this rule will be applied. An empty condition is always true. For more details on condition expressions, please see https://developers.cloudflare.com/load-balancing/understand-basics/load-balancing-rules/expressions.
Disabled bool
Disable this specific rule. It will no longer be evaluated by this load balancer.
FixedResponse LoadBalancerRuleFixedResponse
A collection of fields used to directly respond to the eyeball instead of routing to a pool. If a fixed*response is supplied the rule will be marked as terminates.
Name string
Name of this rule. Only used for human readability.
Overrides LoadBalancerRuleOverrides
A collection of overrides to apply to the load balancer when this rule's condition is true. All fields are optional.
Priority int
The order in which rules should be executed in relation to each other. Lower values are executed first. Values do not need to be sequential. If no value is provided for any rule the array order of the rules field will be used to assign a priority.
Terminates bool
If this rule's condition is true, this causes rule evaluation to stop after processing this rule.
condition String
The condition expressions to evaluate. If the condition evaluates to true, the overrides or fixed_response in this rule will be applied. An empty condition is always true. For more details on condition expressions, please see https://developers.cloudflare.com/load-balancing/understand-basics/load-balancing-rules/expressions.
disabled Boolean
Disable this specific rule. It will no longer be evaluated by this load balancer.
fixedResponse LoadBalancerRuleFixedResponse
A collection of fields used to directly respond to the eyeball instead of routing to a pool. If a fixed*response is supplied the rule will be marked as terminates.
name String
Name of this rule. Only used for human readability.
overrides LoadBalancerRuleOverrides
A collection of overrides to apply to the load balancer when this rule's condition is true. All fields are optional.
priority Integer
The order in which rules should be executed in relation to each other. Lower values are executed first. Values do not need to be sequential. If no value is provided for any rule the array order of the rules field will be used to assign a priority.
terminates Boolean
If this rule's condition is true, this causes rule evaluation to stop after processing this rule.
condition string
The condition expressions to evaluate. If the condition evaluates to true, the overrides or fixed_response in this rule will be applied. An empty condition is always true. For more details on condition expressions, please see https://developers.cloudflare.com/load-balancing/understand-basics/load-balancing-rules/expressions.
disabled boolean
Disable this specific rule. It will no longer be evaluated by this load balancer.
fixedResponse LoadBalancerRuleFixedResponse
A collection of fields used to directly respond to the eyeball instead of routing to a pool. If a fixed*response is supplied the rule will be marked as terminates.
name string
Name of this rule. Only used for human readability.
overrides LoadBalancerRuleOverrides
A collection of overrides to apply to the load balancer when this rule's condition is true. All fields are optional.
priority number
The order in which rules should be executed in relation to each other. Lower values are executed first. Values do not need to be sequential. If no value is provided for any rule the array order of the rules field will be used to assign a priority.
terminates boolean
If this rule's condition is true, this causes rule evaluation to stop after processing this rule.
condition str
The condition expressions to evaluate. If the condition evaluates to true, the overrides or fixed_response in this rule will be applied. An empty condition is always true. For more details on condition expressions, please see https://developers.cloudflare.com/load-balancing/understand-basics/load-balancing-rules/expressions.
disabled bool
Disable this specific rule. It will no longer be evaluated by this load balancer.
fixed_response LoadBalancerRuleFixedResponse
A collection of fields used to directly respond to the eyeball instead of routing to a pool. If a fixed*response is supplied the rule will be marked as terminates.
name str
Name of this rule. Only used for human readability.
overrides LoadBalancerRuleOverrides
A collection of overrides to apply to the load balancer when this rule's condition is true. All fields are optional.
priority int
The order in which rules should be executed in relation to each other. Lower values are executed first. Values do not need to be sequential. If no value is provided for any rule the array order of the rules field will be used to assign a priority.
terminates bool
If this rule's condition is true, this causes rule evaluation to stop after processing this rule.
condition String
The condition expressions to evaluate. If the condition evaluates to true, the overrides or fixed_response in this rule will be applied. An empty condition is always true. For more details on condition expressions, please see https://developers.cloudflare.com/load-balancing/understand-basics/load-balancing-rules/expressions.
disabled Boolean
Disable this specific rule. It will no longer be evaluated by this load balancer.
fixedResponse Property Map
A collection of fields used to directly respond to the eyeball instead of routing to a pool. If a fixed*response is supplied the rule will be marked as terminates.
name String
Name of this rule. Only used for human readability.
overrides Property Map
A collection of overrides to apply to the load balancer when this rule's condition is true. All fields are optional.
priority Number
The order in which rules should be executed in relation to each other. Lower values are executed first. Values do not need to be sequential. If no value is provided for any rule the array order of the rules field will be used to assign a priority.
terminates Boolean
If this rule's condition is true, this causes rule evaluation to stop after processing this rule.

LoadBalancerRuleFixedResponse
, LoadBalancerRuleFixedResponseArgs

ContentType string
The http 'Content-Type' header to include in the response.
Location string
The http 'Location' header to include in the response.
MessageBody string
Text to include as the http body.
StatusCode int
The http status code to respond with.
ContentType string
The http 'Content-Type' header to include in the response.
Location string
The http 'Location' header to include in the response.
MessageBody string
Text to include as the http body.
StatusCode int
The http status code to respond with.
contentType String
The http 'Content-Type' header to include in the response.
location String
The http 'Location' header to include in the response.
messageBody String
Text to include as the http body.
statusCode Integer
The http status code to respond with.
contentType string
The http 'Content-Type' header to include in the response.
location string
The http 'Location' header to include in the response.
messageBody string
Text to include as the http body.
statusCode number
The http status code to respond with.
content_type str
The http 'Content-Type' header to include in the response.
location str
The http 'Location' header to include in the response.
message_body str
Text to include as the http body.
status_code int
The http status code to respond with.
contentType String
The http 'Content-Type' header to include in the response.
location String
The http 'Location' header to include in the response.
messageBody String
Text to include as the http body.
statusCode Number
The http status code to respond with.

LoadBalancerRuleOverrides
, LoadBalancerRuleOverridesArgs

AdaptiveRouting LoadBalancerRuleOverridesAdaptiveRouting
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.
CountryPools Dictionary<string, ImmutableArray<string>>
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.
DefaultPools List<string>
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.
FallbackPool string
The pool ID to use when all other pools are detected as unhealthy.
LocationStrategy LoadBalancerRuleOverridesLocationStrategy
Controls location-based steering for non-proxied requests. See steering_policy to learn how steering is affected.
PopPools Dictionary<string, ImmutableArray<string>>
(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.
RandomSteering LoadBalancerRuleOverridesRandomSteering
Configures pool weights.
RegionPools Dictionary<string, ImmutableArray<string>>
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.
SessionAffinity string
Specifies the type of session affinity the load balancer should use unless specified as "none". The supported types are:
SessionAffinityAttributes LoadBalancerRuleOverridesSessionAffinityAttributes
Configures attributes for session affinity.
SessionAffinityTtl double
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:
SteeringPolicy string
Steering Policy for this load balancer.
Ttl double
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.
AdaptiveRouting LoadBalancerRuleOverridesAdaptiveRouting
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.
CountryPools map[string][]string
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.
DefaultPools []string
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.
FallbackPool string
The pool ID to use when all other pools are detected as unhealthy.
LocationStrategy LoadBalancerRuleOverridesLocationStrategy
Controls location-based steering for non-proxied requests. See steering_policy to learn how steering is affected.
PopPools map[string][]string
(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.
RandomSteering LoadBalancerRuleOverridesRandomSteering
Configures pool weights.
RegionPools map[string][]string
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.
SessionAffinity string
Specifies the type of session affinity the load balancer should use unless specified as "none". The supported types are:
SessionAffinityAttributes LoadBalancerRuleOverridesSessionAffinityAttributes
Configures attributes for session affinity.
SessionAffinityTtl float64
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:
SteeringPolicy string
Steering Policy for this load balancer.
Ttl float64
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.
adaptiveRouting LoadBalancerRuleOverridesAdaptiveRouting
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.
countryPools Map<String,List<String>>
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.
defaultPools List<String>
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.
fallbackPool String
The pool ID to use when all other pools are detected as unhealthy.
locationStrategy LoadBalancerRuleOverridesLocationStrategy
Controls location-based steering for non-proxied requests. See steering_policy to learn how steering is affected.
popPools Map<String,List<String>>
(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.
randomSteering LoadBalancerRuleOverridesRandomSteering
Configures pool weights.
regionPools Map<String,List<String>>
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.
sessionAffinity String
Specifies the type of session affinity the load balancer should use unless specified as "none". The supported types are:
sessionAffinityAttributes LoadBalancerRuleOverridesSessionAffinityAttributes
Configures attributes for session affinity.
sessionAffinityTtl Double
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:
steeringPolicy String
Steering Policy for this load balancer.
ttl Double
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.
adaptiveRouting LoadBalancerRuleOverridesAdaptiveRouting
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.
countryPools {[key: string]: string[]}
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.
defaultPools string[]
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.
fallbackPool string
The pool ID to use when all other pools are detected as unhealthy.
locationStrategy LoadBalancerRuleOverridesLocationStrategy
Controls location-based steering for non-proxied requests. See steering_policy to learn how steering is affected.
popPools {[key: string]: string[]}
(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.
randomSteering LoadBalancerRuleOverridesRandomSteering
Configures pool weights.
regionPools {[key: string]: string[]}
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.
sessionAffinity string
Specifies the type of session affinity the load balancer should use unless specified as "none". The supported types are:
sessionAffinityAttributes LoadBalancerRuleOverridesSessionAffinityAttributes
Configures attributes for session affinity.
sessionAffinityTtl number
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:
steeringPolicy string
Steering Policy for this load balancer.
ttl number
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.
adaptive_routing LoadBalancerRuleOverridesAdaptiveRouting
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.
country_pools Mapping[str, Sequence[str]]
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.
default_pools Sequence[str]
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.
fallback_pool str
The pool ID to use when all other pools are detected as unhealthy.
location_strategy LoadBalancerRuleOverridesLocationStrategy
Controls location-based steering for non-proxied requests. See steering_policy to learn how steering is affected.
pop_pools Mapping[str, Sequence[str]]
(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.
random_steering LoadBalancerRuleOverridesRandomSteering
Configures pool weights.
region_pools Mapping[str, Sequence[str]]
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.
session_affinity str
Specifies the type of session affinity the load balancer should use unless specified as "none". The supported types are:
session_affinity_attributes LoadBalancerRuleOverridesSessionAffinityAttributes
Configures attributes for session affinity.
session_affinity_ttl float
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 str
Steering Policy for this load balancer.
ttl float
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.
adaptiveRouting 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. 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.
countryPools Map<List<String>>
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.
defaultPools List<String>
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.
fallbackPool String
The pool ID to use when all other pools are detected as unhealthy.
locationStrategy Property Map
Controls location-based steering for non-proxied requests. See steering_policy to learn how steering is affected.
popPools Map<List<String>>
(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.
randomSteering Property Map
Configures pool weights.
regionPools Map<List<String>>
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.
sessionAffinity String
Specifies the type of session affinity the load balancer should use unless specified as "none". The supported types are:
sessionAffinityAttributes Property Map
Configures attributes for session affinity.
sessionAffinityTtl Number
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:
steeringPolicy String
Steering Policy for this load balancer.
ttl Number
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.

LoadBalancerRuleOverridesAdaptiveRouting
, LoadBalancerRuleOverridesAdaptiveRoutingArgs

FailoverAcrossPools bool
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 (the default) zero-downtime failover will only occur between origins within the same pool. See session_affinity_attributes for control over when sessions are broken or reassigned.
FailoverAcrossPools bool
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 (the default) zero-downtime failover will only occur between origins within the same pool. See session_affinity_attributes for control over when sessions are broken or reassigned.
failoverAcrossPools Boolean
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 (the default) zero-downtime failover will only occur between origins within the same pool. See session_affinity_attributes for control over when sessions are broken or reassigned.
failoverAcrossPools boolean
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 (the default) zero-downtime failover will only occur between origins within the same pool. See session_affinity_attributes for control over when sessions are broken or reassigned.
failover_across_pools bool
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 (the default) zero-downtime failover will only occur between origins within the same pool. See session_affinity_attributes for control over when sessions are broken or reassigned.
failoverAcrossPools Boolean
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 (the default) zero-downtime failover will only occur between origins within the same pool. See session_affinity_attributes for control over when sessions are broken or reassigned.

LoadBalancerRuleOverridesLocationStrategy
, LoadBalancerRuleOverridesLocationStrategyArgs

Mode string
Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful.
PreferEcs string
Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location.
Mode string
Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful.
PreferEcs string
Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location.
mode String
Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful.
preferEcs String
Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location.
mode string
Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful.
preferEcs string
Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location.
mode str
Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful.
prefer_ecs str
Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location.
mode String
Determines the authoritative location when ECS is not preferred, does not exist in the request, or its GeoIP lookup is unsuccessful.
preferEcs String
Whether the EDNS Client Subnet (ECS) GeoIP should be preferred as the authoritative location.

LoadBalancerRuleOverridesRandomSteering
, LoadBalancerRuleOverridesRandomSteeringArgs

DefaultWeight double
The default weight for pools in the load balancer that are not specified in the pool_weights map.
PoolWeights Dictionary<string, double>
A mapping of pool IDs to custom weights. The weight is relative to other pools in the load balancer.
DefaultWeight float64
The default weight for pools in the load balancer that are not specified in the pool_weights map.
PoolWeights map[string]float64
A mapping of pool IDs to custom weights. The weight is relative to other pools in the load balancer.
defaultWeight Double
The default weight for pools in the load balancer that are not specified in the pool_weights map.
poolWeights Map<String,Double>
A mapping of pool IDs to custom weights. The weight is relative to other pools in the load balancer.
defaultWeight number
The default weight for pools in the load balancer that are not specified in the pool_weights map.
poolWeights {[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.
defaultWeight Number
The default weight for pools in the load balancer that are not specified in the pool_weights map.
poolWeights Map<Number>
A mapping of pool IDs to custom weights. The weight is relative to other pools in the load balancer.

LoadBalancerRuleOverridesSessionAffinityAttributes
, LoadBalancerRuleOverridesSessionAffinityAttributesArgs

DrainDuration double
Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer.
Headers List<string>
Configures the names of HTTP headers to base session affinity on when header session_affinity is enabled. At least one HTTP header name must be provided. To specify the exact cookies to be used, include an item in the following format: "cookie:<cookie-name-1>,<cookie-name-2>" (example) where everything after the colon is a comma-separated list of cookie names. Providing only "cookie" will result in all cookies being used. The default max number of HTTP header names that can be provided depends on your plan: 5 for Enterprise, 1 for all other plans.
RequireAllHeaders bool
When header session_affinity is enabled, this option can be used to specify how HTTP headers on load balancing requests will be used. The supported values are:
Samesite string
Configures the SameSite attribute on session affinity cookie. Value "Auto" will be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: when using value "None", the secure attribute can not be set to "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, and "Auto" will set the Secure attribute depending if Always Use HTTPS is enabled. Available values: "Auto", "Always", "Never".
ZeroDowntimeFailover string
Configures the zero-downtime failover between origins within a pool when session affinity is enabled. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. The supported values are:
DrainDuration float64
Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer.
Headers []string
Configures the names of HTTP headers to base session affinity on when header session_affinity is enabled. At least one HTTP header name must be provided. To specify the exact cookies to be used, include an item in the following format: "cookie:<cookie-name-1>,<cookie-name-2>" (example) where everything after the colon is a comma-separated list of cookie names. Providing only "cookie" will result in all cookies being used. The default max number of HTTP header names that can be provided depends on your plan: 5 for Enterprise, 1 for all other plans.
RequireAllHeaders bool
When header session_affinity is enabled, this option can be used to specify how HTTP headers on load balancing requests will be used. The supported values are:
Samesite string
Configures the SameSite attribute on session affinity cookie. Value "Auto" will be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: when using value "None", the secure attribute can not be set to "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, and "Auto" will set the Secure attribute depending if Always Use HTTPS is enabled. Available values: "Auto", "Always", "Never".
ZeroDowntimeFailover string
Configures the zero-downtime failover between origins within a pool when session affinity is enabled. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. The supported values are:
drainDuration Double
Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer.
headers List<String>
Configures the names of HTTP headers to base session affinity on when header session_affinity is enabled. At least one HTTP header name must be provided. To specify the exact cookies to be used, include an item in the following format: "cookie:<cookie-name-1>,<cookie-name-2>" (example) where everything after the colon is a comma-separated list of cookie names. Providing only "cookie" will result in all cookies being used. The default max number of HTTP header names that can be provided depends on your plan: 5 for Enterprise, 1 for all other plans.
requireAllHeaders Boolean
When header session_affinity is enabled, this option can be used to specify how HTTP headers on load balancing requests will be used. The supported values are:
samesite String
Configures the SameSite attribute on session affinity cookie. Value "Auto" will be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: when using value "None", the secure attribute can not be set to "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, and "Auto" will set the Secure attribute depending if Always Use HTTPS is enabled. Available values: "Auto", "Always", "Never".
zeroDowntimeFailover String
Configures the zero-downtime failover between origins within a pool when session affinity is enabled. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. The supported values are:
drainDuration number
Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer.
headers string[]
Configures the names of HTTP headers to base session affinity on when header session_affinity is enabled. At least one HTTP header name must be provided. To specify the exact cookies to be used, include an item in the following format: "cookie:<cookie-name-1>,<cookie-name-2>" (example) where everything after the colon is a comma-separated list of cookie names. Providing only "cookie" will result in all cookies being used. The default max number of HTTP header names that can be provided depends on your plan: 5 for Enterprise, 1 for all other plans.
requireAllHeaders boolean
When header session_affinity is enabled, this option can be used to specify how HTTP headers on load balancing requests will be used. The supported values are:
samesite string
Configures the SameSite attribute on session affinity cookie. Value "Auto" will be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: when using value "None", the secure attribute can not be set to "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, and "Auto" will set the Secure attribute depending if Always Use HTTPS is enabled. Available values: "Auto", "Always", "Never".
zeroDowntimeFailover string
Configures the zero-downtime failover between origins within a pool when session affinity is enabled. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. The supported values are:
drain_duration float
Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer.
headers Sequence[str]
Configures the names of HTTP headers to base session affinity on when header session_affinity is enabled. At least one HTTP header name must be provided. To specify the exact cookies to be used, include an item in the following format: "cookie:<cookie-name-1>,<cookie-name-2>" (example) where everything after the colon is a comma-separated list of cookie names. Providing only "cookie" will result in all cookies being used. The default max number of HTTP header names that can be provided depends on your plan: 5 for Enterprise, 1 for all other plans.
require_all_headers bool
When header session_affinity is enabled, this option can be used to specify how HTTP headers on load balancing requests will be used. The supported values are:
samesite str
Configures the SameSite attribute on session affinity cookie. Value "Auto" will be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: when using value "None", the secure attribute can not be set to "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, and "Auto" will set the Secure attribute depending if Always Use HTTPS is enabled. Available values: "Auto", "Always", "Never".
zero_downtime_failover str
Configures the zero-downtime failover between origins within a pool when session affinity is enabled. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. The supported values are:
drainDuration Number
Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer.
headers List<String>
Configures the names of HTTP headers to base session affinity on when header session_affinity is enabled. At least one HTTP header name must be provided. To specify the exact cookies to be used, include an item in the following format: "cookie:<cookie-name-1>,<cookie-name-2>" (example) where everything after the colon is a comma-separated list of cookie names. Providing only "cookie" will result in all cookies being used. The default max number of HTTP header names that can be provided depends on your plan: 5 for Enterprise, 1 for all other plans.
requireAllHeaders Boolean
When header session_affinity is enabled, this option can be used to specify how HTTP headers on load balancing requests will be used. The supported values are:
samesite String
Configures the SameSite attribute on session affinity cookie. Value "Auto" will be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: when using value "None", the secure attribute can not be set to "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, and "Auto" will set the Secure attribute depending if Always Use HTTPS is enabled. Available values: "Auto", "Always", "Never".
zeroDowntimeFailover String
Configures the zero-downtime failover between origins within a pool when session affinity is enabled. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. The supported values are:

LoadBalancerSessionAffinityAttributes
, LoadBalancerSessionAffinityAttributesArgs

DrainDuration double
Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer.
Headers List<string>
Configures the names of HTTP headers to base session affinity on when header session_affinity is enabled. At least one HTTP header name must be provided. To specify the exact cookies to be used, include an item in the following format: "cookie:<cookie-name-1>,<cookie-name-2>" (example) where everything after the colon is a comma-separated list of cookie names. Providing only "cookie" will result in all cookies being used. The default max number of HTTP header names that can be provided depends on your plan: 5 for Enterprise, 1 for all other plans.
RequireAllHeaders bool
When header session_affinity is enabled, this option can be used to specify how HTTP headers on load balancing requests will be used. The supported values are:
Samesite string
Configures the SameSite attribute on session affinity cookie. Value "Auto" will be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: when using value "None", the secure attribute can not be set to "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, and "Auto" will set the Secure attribute depending if Always Use HTTPS is enabled. Available values: "Auto", "Always", "Never".
ZeroDowntimeFailover string
Configures the zero-downtime failover between origins within a pool when session affinity is enabled. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. The supported values are:
DrainDuration float64
Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer.
Headers []string
Configures the names of HTTP headers to base session affinity on when header session_affinity is enabled. At least one HTTP header name must be provided. To specify the exact cookies to be used, include an item in the following format: "cookie:<cookie-name-1>,<cookie-name-2>" (example) where everything after the colon is a comma-separated list of cookie names. Providing only "cookie" will result in all cookies being used. The default max number of HTTP header names that can be provided depends on your plan: 5 for Enterprise, 1 for all other plans.
RequireAllHeaders bool
When header session_affinity is enabled, this option can be used to specify how HTTP headers on load balancing requests will be used. The supported values are:
Samesite string
Configures the SameSite attribute on session affinity cookie. Value "Auto" will be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: when using value "None", the secure attribute can not be set to "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, and "Auto" will set the Secure attribute depending if Always Use HTTPS is enabled. Available values: "Auto", "Always", "Never".
ZeroDowntimeFailover string
Configures the zero-downtime failover between origins within a pool when session affinity is enabled. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. The supported values are:
drainDuration Double
Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer.
headers List<String>
Configures the names of HTTP headers to base session affinity on when header session_affinity is enabled. At least one HTTP header name must be provided. To specify the exact cookies to be used, include an item in the following format: "cookie:<cookie-name-1>,<cookie-name-2>" (example) where everything after the colon is a comma-separated list of cookie names. Providing only "cookie" will result in all cookies being used. The default max number of HTTP header names that can be provided depends on your plan: 5 for Enterprise, 1 for all other plans.
requireAllHeaders Boolean
When header session_affinity is enabled, this option can be used to specify how HTTP headers on load balancing requests will be used. The supported values are:
samesite String
Configures the SameSite attribute on session affinity cookie. Value "Auto" will be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: when using value "None", the secure attribute can not be set to "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, and "Auto" will set the Secure attribute depending if Always Use HTTPS is enabled. Available values: "Auto", "Always", "Never".
zeroDowntimeFailover String
Configures the zero-downtime failover between origins within a pool when session affinity is enabled. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. The supported values are:
drainDuration number
Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer.
headers string[]
Configures the names of HTTP headers to base session affinity on when header session_affinity is enabled. At least one HTTP header name must be provided. To specify the exact cookies to be used, include an item in the following format: "cookie:<cookie-name-1>,<cookie-name-2>" (example) where everything after the colon is a comma-separated list of cookie names. Providing only "cookie" will result in all cookies being used. The default max number of HTTP header names that can be provided depends on your plan: 5 for Enterprise, 1 for all other plans.
requireAllHeaders boolean
When header session_affinity is enabled, this option can be used to specify how HTTP headers on load balancing requests will be used. The supported values are:
samesite string
Configures the SameSite attribute on session affinity cookie. Value "Auto" will be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: when using value "None", the secure attribute can not be set to "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, and "Auto" will set the Secure attribute depending if Always Use HTTPS is enabled. Available values: "Auto", "Always", "Never".
zeroDowntimeFailover string
Configures the zero-downtime failover between origins within a pool when session affinity is enabled. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. The supported values are:
drain_duration float
Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer.
headers Sequence[str]
Configures the names of HTTP headers to base session affinity on when header session_affinity is enabled. At least one HTTP header name must be provided. To specify the exact cookies to be used, include an item in the following format: "cookie:<cookie-name-1>,<cookie-name-2>" (example) where everything after the colon is a comma-separated list of cookie names. Providing only "cookie" will result in all cookies being used. The default max number of HTTP header names that can be provided depends on your plan: 5 for Enterprise, 1 for all other plans.
require_all_headers bool
When header session_affinity is enabled, this option can be used to specify how HTTP headers on load balancing requests will be used. The supported values are:
samesite str
Configures the SameSite attribute on session affinity cookie. Value "Auto" will be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: when using value "None", the secure attribute can not be set to "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, and "Auto" will set the Secure attribute depending if Always Use HTTPS is enabled. Available values: "Auto", "Always", "Never".
zero_downtime_failover str
Configures the zero-downtime failover between origins within a pool when session affinity is enabled. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. The supported values are:
drainDuration Number
Configures the drain duration in seconds. This field is only used when session affinity is enabled on the load balancer.
headers List<String>
Configures the names of HTTP headers to base session affinity on when header session_affinity is enabled. At least one HTTP header name must be provided. To specify the exact cookies to be used, include an item in the following format: "cookie:<cookie-name-1>,<cookie-name-2>" (example) where everything after the colon is a comma-separated list of cookie names. Providing only "cookie" will result in all cookies being used. The default max number of HTTP header names that can be provided depends on your plan: 5 for Enterprise, 1 for all other plans.
requireAllHeaders Boolean
When header session_affinity is enabled, this option can be used to specify how HTTP headers on load balancing requests will be used. The supported values are:
samesite String
Configures the SameSite attribute on session affinity cookie. Value "Auto" will be translated to "Lax" or "None" depending if Always Use HTTPS is enabled. Note: when using value "None", the secure attribute can not be set to "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, and "Auto" will set the Secure attribute depending if Always Use HTTPS is enabled. Available values: "Auto", "Always", "Never".
zeroDowntimeFailover String
Configures the zero-downtime failover between origins within a pool when session affinity is enabled. This feature is currently incompatible with Argo, Tiered Cache, and Bandwidth Alliance. The supported values are:

Import

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

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.