-
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
Support max_run_duration for VM #13005
Comments
I'm also looking for this to be added. Do we know when the related PR will be merged and released by chance? |
I'm curious as to why max_run_duration doesn't support the STOP action currently, is this an API issue? |
STOP action is not compatible with Terraform, as GCP will wipe out the timer once it get stopped, and Terraform will lost visibility on this. |
I'm not following, I don't see how Terraform needs to track the run timer, only set the max run duration via the API call. Does the API fail to return the max run duration setting when the instance is stopped? |
Yes, that is why we cannot do it in Terraform, if an instance gets stopped, and max run duration is gone, Terraform cannot understand why there is such a mismatch, and, given the limitation that max run duration can only be updated when the instance is stopped. There isn't a feasible way to work out smoothly. Unfortunately, given the current STOP behavior is not welcomed by Terraform, we made a hard decision to only support the termination at this point. We might consider adding STOP once we improve the API, and this being approved by Terraform in future. |
The GUI displays the max run duration even when the VM is stopped, so it seems this is an API bug. Has an upstream issue been created? I am happy to create one on issue tracker if needed. |
This is intended behavior, but I will sync with the team shortly to see if any recent change has improved the API recently. |
Closing as this was added in GoogleCloudPlatform/magic-modules#6812. If there's additional stuff to track after the initial change, could we spin out a new issue? |
The limitation of having the only supported action being DELETE makes this not usable for most scenarios, max_run_duration supports STOP as an action via GUI and CLI. Not sure this issue should be closed since the implementation doesn't yet support STOP action. However if it needs to be closed then I'm OK with opening a new issue to add the missing support for the STOP action. |
Yeah, a new issue for STOP would be useful! That'll mean that we consolidate information about STOP there, rather than have this issue serve dual purposes. |
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. |
Community Note
Description
New or Affected Resource(s)
Potential Terraform Configuration
References
The text was updated successfully, but these errors were encountered: