mirror of
https://github.com/oscarhermoso/terraform-provider-binarylane
synced 2026-10-19 13:48:08 +11:00
3.8 KiB
3.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(Set 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.ip(String) The IPv4 address of the load balancer.
Nested Schema for forwarding_rules
Required:
entry_protocol(String) The protocol that traffic must match for this load balancer to forward traffic according to this rule.
| Value | Description |
|---|---|
| http | The load balancer will forward HTTP traffic that matches this rule. |
| https | The load balancer will forward HTTPS traffic that matches this rule. |
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.
| Value | Description |
|---|---|
| http | The health check will be performed via HTTP. |
| https | The health check will be performed via HTTPS. |
| both | The health check will be performed via both HTTP and HTTPS. Failing a health check on one protocol will remove the server from the pool of servers only for that 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).update(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:
The terraform import command can be used, for example:
terraform import binarylane_load_balancer.example "<name or id>"