github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/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 ``` 18 # Create a new ECS disk. 19 resource "alicloud_disk" "ecs_disk" { 20 # cn-beijing 21 availability_zone = "cn-beijing-b" 22 name = "New-disk" 23 description = "Hello ecs disk." 24 category = "cloud_efficiency" 25 size = "30" 26 27 tags { 28 Name = "TerraformTest" 29 } 30 } 31 ``` 32 ## Argument Reference 33 34 The following arguments are supported: 35 36 * `availability_zone` - (Required, Forces new resource) The Zone to create the disk in. 37 * `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. 38 * `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. 39 * `category` - (Optional, Forces new resource) Category of the disk. Valid values are `cloud`, `cloud_efficiency` and `cloud_ssd`. Default is `cloud`. 40 * `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. 41 * `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. 42 * `tags` - (Optional) A mapping of tags to assign to the resource. 43 44 ## Attributes Reference 45 46 The following attributes are exported: 47 48 * `id` - The disk ID. 49 * `availability_zone` - The Zone to create the disk in. 50 * `name` - The disk name. 51 * `description` - The disk description. 52 * `status` - The disk status. 53 * `category` - The disk category. 54 * `size` - The disk size. 55 * `snapshot_id` - The disk snapshot ID. 56 * `tags` - The disk tags.