dtcloud_lb_pool (Resource)
Manages the back-end pool attached to a listener, and how it spreads connections across its members.
Example Usage
resource "dtcloud_lb_pool" "web" {
lb_id = dtcloud_lb.public.id
listener_id = dtcloud_lb_listener.https.listener_id
backend_protocol = "HTTP"
backend_protocol_port = 8080
lb_algorithm = "ROUND_ROBIN"
# Pin a client to the member it first reached.
sticky_session = true
}
Schema
Required
backend_protocol(String) Protocol used to reach the members. One of: HTTP, HTTPS, TCP, UDP. Changing this forces a new resource to be created.backend_protocol_port(Number) Port used to reach the members. Changing this forces a new resource to be created.lb_algorithm(String) Balancing algorithm. One of: LEAST_CONNECTIONS, ROUND_ROBIN, SOURCE_IP. Can be changed in place.lb_id(String) ID of the load balancer this pool belongs to. Changing this forces a new resource to be created.listener_id(String) ID of the listener that feeds this pool. Changing this forces a new resource to be created.
Optional
sticky_session(Boolean) Whether to pin a client to the member it first reached. Can be changed in place.timeouts(Block, Optional) (see below for nested schema)
Read-Only
created_at(String) Creation timestamp as reported by the API.health_monitor_id(String) ID of the health monitor attached to this pool, if any.id(String) The ID of this resource.member_ids(List of String) IDs of the members currently in the pool.name(String) Name assigned by the platform.operating_status(String) Operating status.pool_id(String) ID of the pool on its own, without the load balancer prefix.provisioning_status(String) Provisioning status.updated_at(String) Last-update timestamp as reported by the API.
Nested Schema for timeouts
Optional:
create(String)delete(String)update(String)
Behaviour worth knowing
- Only
lb_algorithmandsticky_sessionchange in place. The protocol, the port and the owning listener are fixed at creation. sticky_sessionis write-only. The pool list does not report it, so drift in it is invisible and it does not survive an import.- The algorithm comes back as a display name. The API answers
Round robinwhere it was givenROUND_ROBIN; the provider maps it back so an imported pool does not look like it needs replacing.
Timeouts
create, update and delete each default to 15 minutes.
Import
# <load-balancer-id>:<pool-id>
terraform import dtcloud_lb_pool.web 3d372446-4c75-4327-9511-98442456162f:5b2a9c31-7e04-4d88-9c6e-44a2f1d0e7b3