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

Add option to keep source image labels #127

Closed TomaszUrugOlszewski closed 1 year ago

TomaszUrugOlszewski commented 1 year ago

Description

Hello,

I build base VM image, and add commit ID of ansible code as image label. This allows me to easily tell what do I have deployed.

My problem is that when I use base image to build more images, I lost information about ansible version, and there is no way (or I'm blind) to keep it somehow.

My feature request is:

or (worse)

Use Case(s)

Versioning

Potential configuration

Better, with direct access to base image labels:

image_labels_copy_source_image_labels = [
  "^ansible.*",
  "other labels",
]

Worse, with base image ID to access labels indirectly:

image_labels_add_source_image_id = true