You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a managed image is published to a Compute Gallery using the Azure ARM builder, the ManagedImageId output is sent to HCP Packer as the external_id, but the ManagedImageSharedImageGalleryId is not captured.
Various components of the Gallery ID are included in build tags (sig_name, sig_image_name, sig_image_version, and so on), but not the full ID so it's quite a lot of work to piece it together.
Use Case(s)
Users publishing shared images to a Compute Gallery expect to consume the images using the Gallery ID, not the underlying Managed Image ID.
We talked about this offline but just to post the context here for public knowledge
There are two types of images for Shared Image Gallery Destination builds on the Azure plugin, ones where you first capture it into a managed image, and ones where you direct publish to the SIG, this is the newer way of publishing to SIGs as before managed images were required but Azure released a workaround for this. If you remove the managed_image_name and managed_image_resource_group_name from your build you'll create an HCP Packer artifact that has ManagedImageSharedImageGalleryId sent as the artifact ID instead of the managed image name, while it probably makes sense to send the gallery ID instead of the managed image ID I'd rather avoid changing what we send on that ID to avoid a breaking change, especially since users not concerned with the managed image can direct publish to SIG and get the ID directly.
We should definitely capture this information in an easy to access way though, rather than just sending discrete labels for easy component, we will add ManagedImageSharedImageGalleryId as another label to managed image backed SIG image builds.
JenGoldstrich
changed the title
Add full managed image gallery ID to HCP Packer data
Add full managed image gallery ID to HCP Packer data for managed image backed SIG builds
Apr 2, 2024
Description
When a managed image is published to a Compute Gallery using the Azure ARM builder, the
ManagedImageId
output is sent to HCP Packer as theexternal_id
, but theManagedImageSharedImageGalleryId
is not captured.Various components of the Gallery ID are included in build tags (
sig_name
,sig_image_name
,sig_image_version
, and so on), but not the full ID so it's quite a lot of work to piece it together.Use Case(s)
Users publishing shared images to a Compute Gallery expect to consume the images using the Gallery ID, not the underlying Managed Image ID.
Potential configuration
Given this configuration:
And outputs:
Only the
ManagedImageId
is available in HCP Packer, but theManagedImageSharedImageGalleryId
is desired.Potential References
The text was updated successfully, but these errors were encountered: