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

data "google_compute_image" fails on destroy path if image doesn't exist #21766

Open
mr0re1 opened this issue Mar 8, 2025 · 1 comment · May be fixed by GoogleCloudPlatform/magic-modules#13308
Labels
bug forward/review In review; remove label to forward service/compute-pd

Comments

@mr0re1
Copy link

mr0re1 commented Mar 8, 2025

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.9.2
on linux_386

  • provider registry.terraform.io/hashicorp/google v6.23.0
  • provider registry.terraform.io/hashicorp/google-beta v6.23.0

Affected Resource(s)

google_compute_image

Terraform Configuration

data "google_compute_image" "slurm" {
  name    = "somename"
  project = "someproject"
}

Debug Output

No response

Expected Behavior

$ terraform destroy
...
# All good

Actual Behavior

$ terraform destroy
....
│ Error: error retrieving image information: googleapi: Error 404: The resource 'projects/hpc-toolkit-dev-staging/global/images/slurm-gcp-6-8-debian-11-1736357162' was not found, notFound
│
│   with module.debug_nodeset.data.google_compute_image.slurm,
│   on modules/embedded/community/modules/compute/schedmd-slurm-gcp-v6-nodeset/source_image_logic.tf line 42, in data "google_compute_image" "slurm":
│   42: data "google_compute_image" "slurm" {
│

Steps to reproduce

  1. apply
  2. remove image (not by terraform, but "manually")
  3. destroy

Important Factoids

No response

References

b/401055259

@mr0re1 mr0re1 added the bug label Mar 8, 2025
@github-actions github-actions bot added forward/review In review; remove label to forward service/compute-pd labels Mar 8, 2025
@mr0re1 mr0re1 changed the title google_compute_image fails on destroy path if image doesn't exist data "google_compute_image" fails on destroy path if image doesn't exist Mar 8, 2025
@rohitramu
Copy link

Looks like there's precedent to just log a warning and continue if the resource was not found: hashicorp/terraform#3742

I guess this just needs to be implemented for "google_compute_image"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug forward/review In review; remove label to forward service/compute-pd
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants