Resizing a volume in terraform without enable_online_resize?
-
Is there a way to
terraform apply
and recreate the storage volume rather than settingenable_online_resize
or running aterraform destroy
first?openstack_blockstorage_volume_v3.repo: Modifying... [id=87049fb6-1520-41e3-bcde-44f837dd5d1f] ╷ │ Error: Error extending openstack_blockstorage_volume_v3 87049fb6-1520-41e3-bcde-44f837dd5d1f, │ volume is attached to the instance and │ resizing online is disabled, │ see enable_online_resize option │ │ with openstack_blockstorage_volume_v3.repo, │ on main.tf line 60, in resource "openstack_blockstorage_volume_v3" "repo": │ 60: resource "openstack_blockstorage_volume_v3" "repo" {
I realize I'll lose the data on the volume?
-
You can use https://www.terraform.io/cli/state/taint like this,
terraform apply --replace=openstack_blockstorage_volume_v3.repo