Updated on 2023-12-22 GMT+08:00

Adding an EVS Disk

Application Scenario

Create an EVS disk and attach it to the ECS.

Procedure

  1. Add the following information to the main.tf file:

    resource "huaweicloud_evs_volume" "myvolume" {
      name              = "myvolume"
      availability_zone = data.huaweicloud_availability_zones.myaz.names[0]
      volume_type       = "SAS"
      size              = 10
    }
    
    resource "huaweicloud_compute_volume_attach" "attached" {
      instance_id = huaweicloud_compute_instance.myinstance.id
      volume_id   = huaweicloud_evs_volume.myvolume.id
    }

  2. Run terraform plan to view resources.
  3. After you confirm that the resource information is correct, run terraform apply to start EVS creation.
  4. After the EVS disk is attached to the ECS, you need to initialize the disk before you use it.