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 should allow to specify instance state #1719

Closed
roman8422 opened this issue Jun 29, 2018 · 5 comments
Closed

google_compute_instance should allow to specify instance state #1719

roman8422 opened this issue Jun 29, 2018 · 5 comments

Comments

@roman8422
Copy link

Hi,

There are several long lasting issues open with the same functionality request for aws_instance.
It would be very useful to have such option for google_compute_instance as well.

Terraform Version

Terraform v0.11.7

Affected Resource(s)

  • google_compute_instance

Terraform Configuration Files

resource "google_compute_instance" "default" {
  name         = "test"
  machine_type = "f1-micro"
  zone         = "us-central1-a"
# state        = "running"
# state        = "stopped"

  boot_disk {
    initialize_params {
      image = "debian-cloud/debian-8"
    }
  }

  network_interface {
    network = "default"
  }
}

References

Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:

@paddycarver
Copy link
Contributor

Hi, thanks for the feature request! As you noted, this is a common feature request for other providers, and I think the current state of things is best summed up by Mitchell's response to the feature request for AWS: managing the state of an instance is more complicated than managing the presence of an instance (how do I go from "terminated" to "stopped"? What do we even do with "suspended"?) I think upstream Terraform was thinking on some of this a bit ago, but I don't know that a decision was ever reached.

@hounded
Copy link

hounded commented Jul 11, 2018

This is so needed! I tried deploying the new gitlab chart to a cluster running 2 n1-standard-1 ($50 a month) and the resource hungry beast wouldn't run, it did run on 2 n1-standard-4 but I can't foot a $300 a month bill for my devops when I'm a solo developer, would be so handy to be able to shutdown node pools and then bring them up when needed.

@agadelshin
Copy link

@paddycarver I'm not really sure why do we have "STOPPED" status in compute client. https://cloud.google.com/compute/docs/instances/instance-life-cycle describes TERMINATED state as state for stopped instance. I've created PR using life cycle info from this doc.

@upodroid
Copy link
Contributor

upodroid commented Feb 5, 2021

@rileykarson We can close this. It was fixed in #4797

@ghost
Copy link

ghost commented Mar 8, 2021

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 as resolved and limited conversation to collaborators Mar 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants