Skip to content
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

google_compute_instance > boot_disk > auto_delete update should not force replacement #6892

Comments

@mrzor
Copy link

mrzor commented Jul 30, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to the 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 to hashibot, a community member has claimed the issue already.

Terraform Version

Terraform v0.12.29
+ provider.google v3.30.0
+ provider.google-beta v3.30.0

Affected Resource(s)

  • google_compute_instance

Terraform Configuration Files

resource "google_compute_instance" "main" {
  project             = google_project.main.project_id
  name                = local.xxx_instance_name
  machine_type        = var.xxx_instance_machine_type
  zone                = var.xxx_instance_zone
  deletion_protection = true

  boot_disk {
    source      = google_compute_disk.main_instance_boot_drive.name
    auto_delete = false
  }

  network_interface {
    # snip
  }

  service_account {
    # snip
  }

  scheduling {
    # snip
  }

  guest_accelerator {
    # snip
  }

  # snip depends_on = [ ... ]
}

Expected Behavior

      ~ boot_disk {
          ~ auto_delete                = true -> false

Actual Behavior

      ~ boot_disk {
          ~ auto_delete                = true -> false # forces replacement

Steps to Reproduce

  1. Import an instance
  2. Change the auto_delete value of its boot disk
  3. terraform apply or terraform plan : notice overeager attempt to recreate instance

References

b/374162426

@rileykarson
Copy link
Collaborator

This probably makes sense to fix as part of #6857

@rwblokzijl
Copy link

Is there an update on this? Not being able to change this is a killer if you want to redeploy the machine without wiping the boot-disk.

@fuog
Copy link

fuog commented May 3, 2022

also had problems while moving from standard VM to Spot VM .. spot-VMs forces you to recreate the vm. This is how I first noticed the problem. all our VMs had this feature turned on by default.

@philip-harvey
Copy link

Any chance to get this assigned?

@github-actions github-actions bot added forward/review In review; remove label to forward service/compute-instances labels Oct 25, 2023
@ggtisc ggtisc self-assigned this Aug 12, 2024
@ggtisc

This comment was marked as off-topic.

@karolgorc
Copy link

This seems like a copy of #14707

Will add it to related in PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment