Data source

dcloud_instance_type_offerings

Which instance types each availability zone sells right now. The provider sells from live stock, refreshed every minute: pick availability_zone_id of dcloud_instance (or a fallback server_type) from the rows with in_stock = true.

Example Usage

# The zones that sell performance-2 right now: launch there instead of failing late.
data "dcloud_instance_type_offerings" "performance_2" {
  instance_type = "performance-2"
}

locals {
  performance_2_zones = [for o in data.dcloud_instance_type_offerings.performance_2.items : o.availability_zone_id if o.in_stock]
}

Schema

Optional

  • availability_zone_id (String) Only this zone, e.g. de1b.
  • instance_type (String) Only this instance type, e.g. cax11.
  • region_id (String) Region (default: the caller's).

Read-Only

Nested Schema for items

Read-Only:

  • availability_zone_id (String) Zone, e.g. de1a.
  • changed_at (String) When in_stock last changed.
  • in_stock (Boolean) Whether the zone sells it now.
  • instance_type (String) Instance type, e.g. cax11.
  • provider_location (String) The provider location the zone is, e.g. fsn1.

Generated from the provider's schema.