hashicorp / packer-plugin-googlecompute

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

Unable to find images for community projects such as almalinux-cloud #119

Closed maguec closed 2 years ago

maguec commented 2 years ago

Overview of the Issue

Newer community supported projects are no longer listed

Reproduction Steps

Steps to reproduce this issue

Plugin and Packer version

Packer 1.8.3 Google Compute v1.0.15

Simplified Packer Buildfile

packer {
  required_plugins {
    googlecompute = {
      version = ">= 0.0.1"
      source = "github.com/hashicorp/googlecompute"
    }
  }
}

source "googlecompute" "alma" {
  image_name   = "myalma"
  project_id   = "MYPROJECT"
  source_image = "almalinux-9-v20220920"
  ssh_username = "packer"
  zone         = "us-west1-a"
}

build {
  sources = ["sources.googlecompute.alma"]
}

Operating system and Environment details

happens on both mac and Linux

Log Fragments and crash.log files

* googleapi: Error 404: The resource 'projects/centos-cloud/global/images/almalinux-9-v20220920' was not fou
nd, notFound
* googleapi: Error 404: The resource 'projects/cos-cloud/global/images/almalinux-9-v20220920' was not found, notFoun

but it does not search projects/almalinux-cloud

nywilken commented 2 years ago

Thanks for reaching out. The almalinux-cloud project was not part of the know image-projects. I opened a PR https://github.com/hashicorp/packer-plugin-googlecompute/pull/121, which adds support for. I confirmed that I am able to build using the provided template with the added changes.

There are some test binaries available for download if you are interested in giving the change a test before it is released - https://app.circleci.com/pipelines/github/hashicorp/packer-plugin-googlecompute/216/workflows/57e045cd-6518-4f66-9584-4ceb77065d6f/jobs/2586/artifacts