alicloud_ecs_dedicated_host_clusters

This data source provides the Ecs Dedicated Host Clusters of the current Alibaba Cloud user.

Example Usage

Basic Usage

data "alicloud_ecs_dedicated_host_clusters" "ids" {
  ids = ["example_id"]
}
output "ecs_dedicated_host_cluster_id_1" {
  value = data.alicloud_ecs_dedicated_host_clusters.ids.clusters.0.id
}

data "alicloud_ecs_dedicated_host_clusters" "nameRegex" {
  name_regex = "^my-DedicatedHostCluster"
}
output "ecs_dedicated_host_cluster_id_2" {
  value = data.alicloud_ecs_dedicated_host_clusters.nameRegex.clusters.0.id
}

data "alicloud_ecs_dedicated_host_clusters" "zoneId" {
  zone_id = "example_value"
}
output "ecs_dedicated_host_cluster_id_3" {
  value = data.alicloud_ecs_dedicated_host_clusters.zoneId.clusters.0.id
}

data "alicloud_ecs_dedicated_host_clusters" "clusterName" {
  dedicated_host_cluster_name = "example_value"
}
output "ecs_dedicated_host_cluster_id_4" {
  value = data.alicloud_ecs_dedicated_host_clusters.clusterName.clusters.0.id
}

data "alicloud_ecs_dedicated_host_clusters" "clusterIds" {
  dedicated_host_cluster_ids = ["example_id"]
}
output "ecs_dedicated_host_cluster_id_5" {
  value = data.alicloud_ecs_dedicated_host_clusters.clusterIds.clusters.0.id
}

Argument Reference

The following arguments are supported:

Argument Reference

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