alicloud_cddc_dedicated_hosts

This data source provides the Cddc Dedicated Hosts of the current Alibaba Cloud user.

Example Usage

Basic Usage

data "alicloud_cddc_dedicated_hosts" "ids" {
  dedicated_host_group_id = "example_value"
  ids                     = ["example_value-1", "example_value-2"]
}
output "cddc_dedicated_host_id_1" {
  value = data.alicloud_cddc_dedicated_hosts.ids.hosts.0.id
}

data "alicloud_cddc_dedicated_hosts" "status" {
  dedicated_host_group_id = "example_value"
  ids                     = ["example_value-1", "example_value-2"]
  status                  = "1"
}
output "cddc_dedicated_host_id_2" {
  value = data.alicloud_cddc_dedicated_hosts.status.hosts.0.id
}

data "alicloud_cddc_dedicated_hosts" "zoneId" {
  dedicated_host_group_id = "example_value"
  ids                     = ["example_value-1", "example_value-2"]
  zone_id                 = "example_value"
}
output "cddc_dedicated_host_id_3" {
  value = data.alicloud_cddc_dedicated_hosts.zoneId.hosts.0.id
}

data "alicloud_cddc_dedicated_hosts" "allocationStatus" {
  dedicated_host_group_id = "example_value"
  ids                     = ["example_value-1", "example_value-2"]
  allocation_status       = "Allocatable"
}
output "cddc_dedicated_host_id_4" {
  value = data.alicloud_cddc_dedicated_hosts.allocationStatus.hosts.0.id
}

data "alicloud_cddc_dedicated_hosts" "hostType" {
  dedicated_host_group_id = "example_value"
  ids                     = ["example_value-1", "example_value-2"]
  host_type               = "dhg_cloud_ssd"
}
output "cddc_dedicated_host_id_5" {
  value = data.alicloud_cddc_dedicated_hosts.hostType.hosts.0.id
}

Argument Reference

The following arguments are supported:

Argument Reference

The following attributes are exported in addition to the arguments listed above: