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

Change allow_stopping_for_update from true to false #1186

Closed
benbro opened this issue Mar 12, 2018 · 3 comments
Closed

Change allow_stopping_for_update from true to false #1186

benbro opened this issue Mar 12, 2018 · 3 comments

Comments

@benbro
Copy link

benbro commented Mar 12, 2018

It should be possible to change the "allow_stopping_for_update" field without restarting the server if all other fields like machine type aren't changed.

Terraform Version

Terraform v0.11.3

  • provider.google v1.6.0
  • provider.local v1.1.0

Affected Resource(s)

  • google_compute_instance

Terraform Configuration Files

resource "google_compute_instance" "mytest" {
  name         = "mytest"
  machine_type = "n1-standard-1"
  zone         = "europe-west1-b"
  allow_stopping_for_update = true

  scheduling {
    automatic_restart = true
  }

  tags = ["mytag"]

  boot_disk {
    initialize_params {
      size = 20
      image = "ubuntu-os-cloud/ubuntu-1604-lts"
    }
  }

  network_interface {
    network = "default"

    access_config {
      // Ephemeral IP
    }
  }

  service_account {
    email = "${google_service_account.mytest.email}",
    scopes = ["https://www.googleapis.com/auth/cloud-platform"]
  }
}

Expected Behavior

The field should change without restarting the server:

Terraform will perform the following actions:
  ~ google_compute_instance.mytest
      allow_stopping_for_update: "true" => "false"

Actual Behavior

Error: Error applying plan:

1 error(s) occurred:

* google_compute_instance.mytest: 1 error(s) occurred:

* google_compute_instance.mytest: Changing the machine_type, min_cpu_platform, or service_account on an instance requires stopping it. To acknowledge this, please set allow_stopping_for_update = true in your config.

Steps to Reproduce

  1. create compute instance without the allow_stopping_for_update field.
  2. change the machine type and set "allow_stopping_for_update = true" .
  3. change "allow_stopping_for_update = false"
@danawillow
Copy link
Contributor

Hey @benbro, I think this was caused by the issue that #1130 fixed. We just released that fix today- can you try upgrading to 1.7.0 and seeing if that helps?

@benbro
Copy link
Author

benbro commented Mar 13, 2018

It is fixed in 1.7.0.
Thank you for the fast response.

@benbro benbro closed this as completed Mar 13, 2018
@ghost
Copy link

ghost commented Mar 29, 2020

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.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants