alibaba / terraform-provider

[DEPRECATED] This repo has been deprecated and please access https://github.com/terraform-providers/terraform-provider-alicloud
Apache License 2.0
384 stars 117 forks source link

alicloud_disk can be shrunk #738

Closed mehemken closed 5 years ago

mehemken commented 6 years ago

So... terraform apply allows me to change the size of a disk to be smaller than the current size. Apply is completed successfully. But no change happens on the console. A terraform plan done immediately after a successful apply results in sending the same request to alicloud.

debug output


✗ terraform apply

...

module.testdb_attached_disks.alicloud_disk.ecs_disk[0]: Modifying... (ID: d-afs3d51f3sd5afasdfa)
  size:      "1000" => "50"

...

Apply complete! Resources: 2 added, 1 changed, 0 destroyed.

✗ terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

...

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  ~ module.testdb_attached_disks.alicloud_disk.ecs_disk[0]
      size: "1000" => "50"

Plan: 0 to add, 1 to change, 0 to destroy.


Expected behavior

Changing the size should be allowed only if size is increased. The opposite (decreasing size) should not be allowed. Terraform should reject decreasing the size of a disk.

mehemken commented 6 years ago

Actually, increasing the disk size does not work. Is this feature not implemented yet?

nightmeng commented 5 years ago

We have supported the disk resize in new version, please be patient.

nightmeng commented 5 years ago

We have fixed it in v1.24.0, please check it, thank you very much!