Skip to main content

dtcloud_lb_flavors (Data Source)

Lists the load balancer sizes available in the region, each name offered twice -- once without high availability and once with it.

Example Usage​

# Each size is offered twice: once with high availability and once without. That
# flag is how HA is chosen -- there is no separate switch on the load balancer.
data "dtcloud_lb_flavors" "small_ha" {
name = "small"
ha = true
}

output "flavor_id" {
value = data.dtcloud_lb_flavors.small_ha.flavors[0].id
}

Schema​

Optional​

  • ha (Boolean) Only return flavors with this high-availability setting. Names repeat across the two settings, so combine this with name to identify one flavor.
  • name (String) Only return flavors whose name matches exactly. Applied here, not by the API.

Read-Only​

  • flavors (List of Object) The flavors that matched. (see below for nested schema)
  • id (String) The ID of this resource.

Nested Schema for flavors​

Read-Only:

  • ha (Boolean)
  • id (String)
  • name (String)
  • ram (String)
  • vcpus (Number)

Behaviour worth knowing​

  • Every name is offered twice, once with ha = false and once with ha = true, and the two are different flavors with different ids. That flag is how high availability is chosen: there is no separate switch on dtcloud_lb. Filter on name and ha together, or the match is ambiguous.
  • name and ha filter in the provider, not the API. The endpoint takes no parameters, so the full catalogue is fetched either way.
  • Read-only. Flavors are defined by the operator; there is no resource here.