Files
terraform-provider-binarylane/docs/resources/load_balancer.md
T
Oscar Hermoso 11e0302e71 🛒 Create data sources for images, regions and sizes (#68)
* 📚 add descriptions to resources

* 📷 Create `images` data source, plus codegen for `sizes`, `regions`

* 🍩 Create offerings example

* 🧣 Create `regions` and `sizes` data sources
2025-02-28 17:21:18 +08:00

2.8 KiB

page_title, subcategory, description
page_title subcategory description
binarylane_load_balancer Resource - terraform-provider-binarylane Provides a BinaryLane Load Balancer resource. This can be used to create, update, and delete load balancers. See the docs https://support.binarylane.com.au/support/solutions/articles/1000025661-load-balancer for more information.

binarylane_load_balancer (Resource)

Provides a BinaryLane Load Balancer resource. This can be used to create, update, and delete load balancers. See the docs for more information.

Example Usage

resource "binarylane_server" "example" {
  count = 2
  # ...
}

resource "binarylane_load_balancer" "example" {
  name             = "tf-example-lb"
  forwarding_rules = [{ entry_protocol = "https" }]
  server_ids = [
    binarylane_server.example.0.id,
    binarylane_server.example.1.id
  ]
}

Schema

Required

  • name (String) The hostname of the load balancer.

Optional

  • forwarding_rules (Attributes List) The rules that control which traffic the load balancer will forward to servers in the pool. Leave null to accept a default "HTTP" only forwarding rule. (see below for nested schema)
  • health_check (Attributes) The rules that determine which servers are considered 'healthy' and in the server pool for the load balancer. Leave this null to accept appropriate defaults based on the forwarding_rules. (see below for nested schema)
  • region (String) Leave null to create an anycast load balancer.
  • server_ids (List of Number) A list of server IDs to assign to this load balancer.
  • timeouts (Attributes) (see below for nested schema)

Read-Only

  • id (Number) The ID of the load balancer to fetch.

Nested Schema for forwarding_rules

Required:

  • entry_protocol (String) The protocol that traffic must match for the load balancer to forward it. Valid values are "http" and "https".

Nested Schema for health_check

Optional:

  • path (String) Leave null to accept the default '/' path.
  • protocol (String) Leave null to accept the default HTTP protocol.

Nested Schema for timeouts

Optional:

  • create (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

Import

Import is supported using the following syntax:

terraform import binarylane_load_balancer.example "<name or id>"