Class LoadBalancer
Provides a Cloudflare Load Balancer resource. This sits in front of a number of defined pools of origins and provides various options for geographically-aware load balancing. Note that the load balancing feature must be enabled in your Cloudflare account before you can use this resource.
Inherited Members
Namespace: Pulumi.Cloudflare
Assembly: Pulumi.Cloudflare.dll
Syntax
public class LoadBalancer : CustomResource
Constructors
View SourceLoadBalancer(String, LoadBalancerArgs, CustomResourceOptions)
Create a LoadBalancer resource with the given unique name, arguments, and options.
Declaration
public LoadBalancer(string name, LoadBalancerArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| LoadBalancerArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceCreatedOn
The RFC3339 timestamp of when the load balancer was created.
Declaration
public Output<string> CreatedOn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DefaultPoolIds
A list of pool IDs ordered by their failover priority. Used whenever region/pop pools are not defined.
Declaration
public Output<ImmutableArray<string>> DefaultPoolIds { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Description
Free text description.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Enabled
Enable or disable the load balancer. Defaults to true (enabled).
Declaration
public Output<bool?> Enabled { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
FallbackPoolId
The pool ID to use when all other pools are detected as unhealthy.
Declaration
public Output<string> FallbackPoolId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ModifiedOn
The RFC3339 timestamp of when the load balancer was last modified.
Declaration
public Output<string> ModifiedOn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The DNS name (FQDN, including the zone) to associate with the load balancer.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
PopPools
A set containing mappings of Cloudflare Point-of-Presence (PoP) identifiers to a list of pool IDs (ordered by their failover priority) for the PoP (datacenter). This feature is only available to enterprise customers. Fields documented below.
Declaration
public Output<ImmutableArray<LoadBalancerPopPool>> PopPools { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<LoadBalancerPopPool>> |
Proxied
Whether the hostname gets Cloudflare's origin protection. Defaults to false.
Declaration
public Output<bool?> Proxied { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
RegionPools
A set containing mappings of region/country codes to a list of pool IDs (ordered by their failover priority) for the given region. Fields documented below.
Declaration
public Output<ImmutableArray<LoadBalancerRegionPool>> RegionPools { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<LoadBalancerRegionPool>> |
SessionAffinity
Associates all requests coming from an end-user with a single origin. Cloudflare will set a cookie on the initial response to the client, such that consequent requests with the cookie in the request will go to the same origin, so long as it is available. Valid values are: "", "none", "cookie", and "ip_cookie". Default is "".
Declaration
public Output<string> SessionAffinity { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SteeringPolicy
Determine which method the load balancer uses to determine the fastest route to your origin. Valid values are: "off", "geo", "dynamic_latency", "random" or "". Default is "".
Declaration
public Output<string> SteeringPolicy { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Ttl
Time to live (TTL) of this load balancer's DNS name. Conflicts with proxied - this cannot be set for proxied load balancers. Default is 30.
Declaration
public Output<int> Ttl { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
ZoneId
The zone ID to add the load balancer to.
Declaration
public Output<string> ZoneId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, LoadBalancerState, CustomResourceOptions)
Get an existing LoadBalancer resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static LoadBalancer Get(string name, Input<string> id, LoadBalancerState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| LoadBalancerState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| LoadBalancer |