github.com/cbroglie/terraform@v0.7.0-rc3.0.20170410193827-735dfc416d46/website/source/docs/providers/alicloud/r/disk.html.markdown (about) 1 --- 2 layout: "alicloud" 3 page_title: "Alicloud: alicloud_disk" 4 sidebar_current: "docs-alicloud-resource-disk." 5 description: |- 6 Provides a ECS Disk resource. 7 --- 8 9 # alicloud_disk 10 11 Provides a ECS disk resource. 12 13 ~> **NOTE:** One of `size` or `snapshot_id` is required when specifying an ECS disk. If all of them be specified, `size` must more than the size of snapshot which `snapshot_id` represents. Currently, `alicloud_disk` doesn't resize disk. 14 15 ## Example Usage 16 17 ```hcl 18 resource "alicloud_disk" "ecs_disk" { 19 availability_zone = "cn-beijing-b" 20 name = "New-disk" 21 description = "Hello ecs disk." 22 category = "cloud_efficiency" 23 size = "30" 24 25 tags { 26 Name = "TerraformTest" 27 } 28 } 29 ``` 30 ## Argument Reference 31 32 The following arguments are supported: 33 34 * `availability_zone` - (Required, Forces new resource) The Zone to create the disk in. 35 * `name` - (Optional) Name of the ECS disk. This name can have a string of 2 to 128 characters, must contain only alphanumeric characters or hyphens, such as "-",".","\_", and must not begin or end with a hyphen, and must not begin with http:// or https://. Default value is null. 36 * `description` - (Optional) Description of the disk. This description can have a string of 2 to 256 characters, It cannot begin with http:// or https://. Default value is null. 37 * `category` - (Optional, Forces new resource) Category of the disk. Valid values are `cloud`, `cloud_efficiency` and `cloud_ssd`. Default is `cloud`. 38 * `size` - (Required) The size of the disk in GiBs, and its value depends on `Category`. `cloud` disk value range: 5GB ~ 2000GB and other category disk value range: 20 ~ 32768. 39 * `snapshot_id` - (Optional) A snapshot to base the disk off of. If it is specified, `size` will be invalid and the disk size is equals to the snapshot size. 40 * `tags` - (Optional) A mapping of tags to assign to the resource. 41 42 ## Attributes Reference 43 44 The following attributes are exported: 45 46 * `id` - The disk ID. 47 * `availability_zone` - The Zone to create the disk in. 48 * `name` - The disk name. 49 * `description` - The disk description. 50 * `status` - The disk status. 51 * `category` - The disk category. 52 * `size` - The disk size. 53 * `snapshot_id` - The disk snapshot ID. 54 * `tags` - The disk tags.