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.
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"
}
The following arguments are supported:
category
- (Required, ForceNew) Types of disk instancesValues: cloud_efficiency (high-efficiency cloud disk),cloud_ssd (full Flash cloud disk),local_hdd (local HDD),local_ssd (local ssd).disk_name
- (Optional) Name of the disk instance.encrypted
- (Optional, ForceNew) Indicates whether the cloud disk is Encrypted. If Encrypted = true, the default service key is used when KMSKeyId is not entered. Value range:true
, false
(default).ens_region_id
- (Required, ForceNew) Ens node IDExample value: cn-chengdu-telecom.kms_key_id
- (Optional, ForceNew) The ID of the KMS key used by the cloud disk. If Encrypted is set to true, the service default key is used when KMSKeyId is empty.payment_type
- (Required, ForceNew) Billing type of the disk instanceValue: PayAsYouGo.size
- (Optional) 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:
The following attributes are exported:
id
- The ID of the resource supplied above.create_time
- Disk instance creation time.status
- Status of the disk instance:Value:In-use: In useAvailable: To be mountedAttaching: AttachingDetaching: uninstallingCreating: CreatingReIniting: Resetting.The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 5 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.ENS Disk can be imported using the id, e.g.
$ terraform import alicloud_ens_disk.example <id>