GCP VMs fail to start sporadically with "desired_status can only accept RUNNING value" error

We are using Coder to manager GCP VMs with devcontainers, and occasionally the machine will get into a state where it is unable to start, getting the following terraform error:
Error: When creating an instance, desired_status can only accept RUNNING value
on main.tf line 334, in resource "google_compute_instance" "vm":
334: resource "google_compute_instance" "vm" {
Error: When creating an instance, desired_status can only accept RUNNING value
on main.tf line 334, in resource "google_compute_instance" "vm":
334: resource "google_compute_instance" "vm" {
Are there any tools available to debug this? One workaround I've seen is to change some of the machine parameters that cause it to be re-created, e.g. it's size, but that's rather annoying to have to do.
2 Replies
Codercord
Codercord6mo ago
<#1257440281347887196>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
Aaron Taylor
Aaron TaylorOP6mo ago
Attached file that we're roughly using for this template
Want results from more Discord servers?
Add your server