Skip to main content

dtcloud_lbs (Data Source)

Lists the load balancers in the active region.

Example Usage​

data "dtcloud_lbs" "all" {}

output "load_balancers" {
value = [for lb in data.dtcloud_lbs.all.load_balancers : "${lb.name} ${lb.ip_address} ${lb.status}"]
}

Schema​

Read-Only​

  • id (String) The ID of this resource.
  • load_balancers (List of Object) The load balancers visible to the caller. (see below for nested schema)

Nested Schema for load_balancers​

Read-Only:

  • flavor_name (String)
  • floating_ip (String)
  • id (String)
  • ip_address (String)
  • members_total (Number)
  • name (String)
  • network (List of Object) (see below for nested schema)
  • port_id (String)
  • status (String)

Nested Schema for load_balancers.network​

Read-Only:

  • id (String)
  • ip (String)
  • name (String)

Behaviour worth knowing​

  • The list endpoint reports a display shape, flatter than the details one. For everything about a single load balancer, use dtcloud_lb.
  • The id is a hash of the results, so an unchanged list does not show up as a diff.