-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resize boot disk cause destroy and recreate VM #12124
Comments
@edwardmedia It's not related to #8597 ... #8597 is about downsize disk. My case is about increase size of disk. It can be done without any changes to VM instance. |
@shumak80 That is the boot_disk, right? Where did you see you can resize the boot_disk without recreation? |
@edwardmedia It's a common thing ... you can read about this here. Even you can try it via console. If you create a boot disk as separate resource and use it as source for boot disk, then you are able to resize boot disk without re-creation. |
It seems that in-place update for this field is not yet supported when the feature was implemented. Making it updatable is a feature request and marking this issue as enhancement then. |
Ok. Then it should be mentioned in terraform documentation. To warn everybody that this feature is not ready yet. |
See #6087 for prior discussion on the matter, mostly #6087 (comment). |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Terraform Version
Terraform v1.2.2
Affected Resource(s)
Terraform Configuration Files
resource "google_compute_instance" "default" {
name = "vm1"
machine_type = "e2-standard-2"
zone = "europe-west3-a"
boot_disk {
initialize_params {
image = "debian-cloud/debian-10"
size = "20"
type = "pd-standard"
}
}
network_interface {
subnetwork = "default"
}
}
Expected Behavior
GCP provider support resize of disk without destroy/recreate the instance.
Actual Behavior
The VM is deleted and recreated.
GCP is able to resize the disk on the fly even boot disk so I expect to have the size increased but without deleting re-creating the VM.
Steps to Reproduce
terraform apply
terraform apply
Important Factoids
References
This issue was already solved in #861 , but it was for resource google_compute_disk.
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.The text was updated successfully, but these errors were encountered: