-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Description
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 a user, that user is claiming responsibility for the issue.
- Customers working with a Google Technical Account Manager or Customer Engineer can ask them to reach out internally to expedite investigation and resolution of this issue.
Terraform Version & Provider Version(s)
Terraform v1.14.5
on darwin_arm64
- provider registry.terraform.io/hashicorp/google v7.20.0
Affected Resource(s)
google_compute_instance
Terraform Configuration
resource "google_compute_instance" "repro" {
name = "local-ssd-stop-repro"
machine_type = "n2-standard-2"
desired_status = "RUNNING"
boot_disk {
initialize_params {
image = "debian-cloud/debian-12"
size = 20
}
}
scratch_disk {
interface = "NVME"
}
network_interface {
network = "default"
access_config {}
}
scheduling {
instance_termination_action = "STOP"
on_instance_stop_action {
discard_local_ssd = true
}
}
}Debug Output
No response
Expected Behavior
We should be able to stop an instance with a Local SSD because on_instance_stop_action.discard_local_ssd is set.
Actual Behavior
I receive the following error:
β Error: googleapi: Error 400: VM has a Local SSD attached but an undefined value for `discard-local-ssd`. If using gcloud, please add `--discard-local-ssd=false` or `--discard-local-ssd=true` to your command., badRequest
β
β with module.ingest-vm.google_compute_instance.ingest-vm,
β on ../../modules/ingest-vm/instance.tf line 1, in resource "google_compute_instance" "ingest-vm":
β 1: resource "google_compute_instance" "ingest-vm" {
Steps to reproduce
terraform apply- Change
desired_statustoTERMINATED terraform apply
Important Factoids
I believe we might have to add a discardLocalSsd=true query parameter to the POST request.
References
No response
b/486166322
Reactions are currently unavailable