packer-plugin-googlecompute icon indicating copy to clipboard operation
packer-plugin-googlecompute copied to clipboard

googlecompute-export uses a random image after it has built a custom image

Open ghost opened this issue 4 years ago • 1 comments

This issue was originally opened by @saeeda as hashicorp/packer#8376. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.


Overview of the Issue

When exporting a custom built image using googlecompute-export, it uses a different image to build the temporary instance in googlecompute-export): Using image step.

Reproduction Steps

Create a custom image using the googlecompute similar to following: Sample-packer-config.md

Packer version

From PACKER_VERSION=1.4.4

Simplified Packer Buildfile

Sample-packer-config.md

Operating system and Environment details

Running by Jenkins() inside a docker agent, running docker. CentOS Linux 7 Docker version 18.09.6 Jenkins ver. 2.164.2

Log Fragments and crash.log files

As shown in the gist above, packer uses an image for creating an image, that does not reflect the custom image being created by packer. The image name neither exists in the google project where packer is run, nor where custom image is built.

==> googlecompute (googlecompute-export): Using image: random-image-name

ghost avatar Apr 19 '21 10:04 ghost