alicloud_ens_disk
更新时间:
Provides a ENS Disk resource.
The disk. When you use it for the first time, please contact the product classmates to add a resource whitelist.
For information about ENS Disk and how to use it, see What is Disk.
-> NOTE: Available since v1.213.0.
Example Usage
Basic Usage
variable "name" {
default = "terraform-example"
}
resource "alicloud_ens_disk" "default" {
category = "cloud_ssd"
size = "20"
payment_type = "PayAsYouGo"
ens_region_id = "cn-chongqing-11"
}
Argument Reference
The following arguments are supported:
category- (Required, ForceNew) The category of the disk. Valid values:cloud_efficiency(high-efficiency cloud disk),cloud_ssd(full Flash cloud disk),local_hdd(local HDD),local_ssd(local ssd).disk_name- (Optional) The name of the disk.encrypted- (Optional, ForceNew) Specifies whether to encrypt the new system disk. Valid values:true,false(default).ens_region_id- (Required, ForceNew) The ID of the edge node.kms_key_id- (Optional, ForceNew) The ID of the KMS key used by the cloud disk. Ifencryptedis set totrue, the service default key is used when KMSKeyId is empty.payment_type- (Required, ForceNew) The billing method of the instance. Valid values:PayAsYouGo.size- (Optional, Int) The size of the disk instance. Unit: GiB.snapshot_id- (Optional, ForceNew) The ID of the snapshot used to create the cloud disk.
The SnapshotId and Size parameters have the following limitations:
- If the snapshot capacity corresponding to the
snapshot_idparameter is greater than the specifiedsizeparameter, the Size of the cloud disk created is the Size of the specified snapshot. - If the snapshot capacity corresponding to the
snapshot_idparameter is less than the setsizeparameter value, the Size of the cloud disk created is the specifiedsizeparameter value.
tags- (Optional, Map, Available since v1.248.0) The label to which the instance is bound.
Attributes Reference
The following attributes are exported:
id- The ID of the resource supplied above.create_time- The time when the disk was created.status- The status of the disk.
Timeouts
The timeouts block allows you to specify timeouts for certain actions:
create- (Defaults to 7 mins) Used when create the Disk.delete- (Defaults to 5 mins) Used when delete the Disk.update- (Defaults to 5 mins) Used when update the Disk.
Import
ENS Disk can be imported using the id, e.g.
$ terraform import alicloud_ens_disk.example <id>
该文章对您有帮助吗?