hashicorp / packer-plugin-googlecompute

Packer plugin for Google Compute Builder
https://www.packer.io/docs/builders/googlecompute
Mozilla Public License 2.0
24 stars 54 forks source link

Cannot use source images from deeplearning-platform-release project #229

Open jbaldassari opened 1 month ago

jbaldassari commented 1 month ago

Overview of the Issue

Similar to https://github.com/hashicorp/packer-plugin-googlecompute/issues/191, source images from the deeplearning-platform-release project cannot be used with this plugin. Related: https://github.com/hashicorp/packer-plugin-googlecompute/issues/193

Reproduction Steps

Use a source image from the deeplearning-platform-release project, such as common-cu123-v20240708-debian-11

Plugin and Packer version

Packer: v1.11.0 packer-plugin-googlecompute: v1.1.3_x5.0_linux_amd64

Simplified Packer Buildfile

{
  ...
  "builders": [
    {
      "type": "googlecompute",
      "source_image": "common-cu123-v20240708-debian-11"
      ...
    }
}

Operating system and Environment details

Linux x86-64

Log Fragments and crash.log files

Error getting source image for instance creation: Could not find image, common-cu123-v20240708-debian-11, in projects,
[<our project>, almalinux-cloud centos-cloud cloud-hpc-image-public cos-cloud coreos-cloud debian-cloud fedora-cloud fedora-coreos-cloud freebsd-org-cloud-dev rhel-cloud rhel-sap-cloud rocky-linux-cloud suse-cloud suse-sap-cloud suse-byos-cloud ubuntu-os-cloud windows-cloud windows-sql-cloud gce-nvme google-containers opensuse-cloud ubuntu-os-pro-cloud ml-images]
jbaldassari commented 1 month ago

As mentioned in https://github.com/hashicorp/packer-plugin-googlecompute/pull/230#issuecomment-2253357301 , setting source_image_project_id=deeplearning-platform-release seems to be a valid workaround for not having deeplearning-platform-release in the default list of projects.