terraform/website/source/docs/providers/alicloud/d/zones.html.markdown

48 lines
1.5 KiB
Markdown
Raw Normal View History

2017-01-19 15:08:56 +01:00
---
layout: "alicloud"
page_title: "Alicloud: alicloud_zones"
sidebar_current: "docs-alicloud-datasource-zones"
description: |-
Provides a list of Availability Zones which can be used by an Alicloud account.
---
2017-04-05 17:30:46 +02:00
# alicloud_zones
2017-01-19 15:08:56 +01:00
The Zones data source allows access to the list of Alicloud Zones which can be accessed by an Alicloud account within the region configured in the provider.
## Example Usage
2017-04-05 17:30:46 +02:00
```hcl
2017-01-19 15:08:56 +01:00
# Declare the data source
data "alicloud_zones" "default" {
"available_instance_type" = "ecs.s2.large"
"available_disk_category" = "cloud_ssd"
2017-01-19 15:08:56 +01:00
}
# Create ecs instance with the first matched zone
resource "alicloud_instance" "instance" {
availability_zone = "${data.alicloud_zones.default.zones.0.id}"
2017-04-05 17:30:46 +02:00
# ...
2017-01-19 15:08:56 +01:00
}
```
## Argument Reference
The following arguments are supported:
* `available_instance_type` - (Optional) Limit search to specific instance type.
* `available_resource_creation` - (Optional) Limit search to specific resource type. The following values are allowed `Instance`, `Disk` and `VSwitch`.
* `available_disk_category` - (Optional) Limit search to specific disk category. Can be either `cloud`, `ephemeral`, or `ephemeral_ssd`.
## Attributes Reference
The following attributes are exported:
* `id` - ID of the zone.
* `local_name` - Name of the zone in the local language.
* `available_instance_types` - Instance types allowed.
* `available_resource_creation` - Type of resource that can be created.
* `available_disk_categories` - Set of supported disk categories.