» ucloud_lb_listeners
This data source provides a list of Load Balancer Listener resources according to their Load Balancer Listener ID.
» Example Usage
data "ucloud_lb_listeners" "example" {
load_balancer_id = "ulb-xxx"
}
output "first" {
value = "${data.ucloud_lb_listeners.example.lb_listeners.0.id}"
}
» Argument Reference
The following arguments are supported:
-
load_balancer_id
- (Required) The ID of a load balancer. -
ids
- (Optional) A list of LB Listener IDs, all the LB Listeners belong to this region will be retrieved if the ID is""
. -
name_regex
- (Optional) A regex string to filter resulting lb listeners by name. -
output_file
- (Optional) File name where to save data source results (after runningterraform plan
).
» Attributes Reference
In addition to all arguments above, the following attributes are exported:
-
lb_listeners
- It is a nested type which documented below. -
total_count
- Total number of LB listeners that satisfy the condition.
The attribute (lb_listeners
) support the following:
-
id
- The ID of LB Listener. -
name
- The name of LB Listener. -
protocol
- LB Listener protocol. Possible values:http
,https
iflisten_type
isrequest_proxy
,tcp
andudp
iflisten_type
ispackets_transmit
. -
listen_type
- The type of LB Listener. Possible values arerequest_proxy
andpackets_transmit
. -
port
- Port opened on the LB Listener to receive requests, range: 1-65535. -
idle_timeout
- Amount of time in seconds to wait for the response for in between two sessions iflisten_type
isrequest_proxy
, range: 0-86400. Amount of time in seconds to wait for one session iflisten_type
ispackets_transmit
, range: 60-900. The session will be closed as soon as no response if it is0
. -
method
- The load balancer method in which the listener is. Possible values are:roundrobin
,source
,consistent_hash
,source_port
,consistent_hash_port
,weight_roundrobin
andleastconn
.- The
consistent_hash
,source_port
,consistent_hash_port
,roundrobin
,source
andweight_roundrobin
are valid iflisten_type
ispackets_transmit
. - The
rundrobin
,source
andweight_roundrobin
andleastconn
are vaild iflisten_type
isrequest_proxy
.
- The
-
persistence
- Indicate whether the persistence session is enabled, it is invaild ifpersistence_type
isnone
, an auto-generated string will be exported ifpersistence_type
isserver_insert
, a custom string will be exported ifpersistence_type
isuser_defined
. -
persistence_type
- The type of session persistence of LB Listener. Possible values are:none
as disabled,server_insert
as auto-generated string anduser_defined
as cutom string. (Default:none
). -
health_check_type
- Health check method. Possible values areport
as port checking andpath
as http checking. -
path
- Health check path checking. -
domain
- Health check domain checking. -
status
- LB Listener status. Possible values are:allNormal
for all resource functioning well,partNormal
for partial resource functioning well andallException
for all resource functioning exceptional.