Enable packer to add managed images to Azure Share Image Gallery. I know that packer supports using the shared image gallery as a source, but I would also like to be able to add packages it builds to the gallery.
I can then use terraform to manage version.
I think you can do this today with the shell-local post-processor.
I have yet to figure that out. What would the publisher, offer, and sku be?
Additionally, wouldn't it make more sense to have it as part of the product instead of using a shell script after the fact?
😄
It's hard to tell if a person wants something right now, or he wants something for the future. My default response is to answer with the right now, and leave the issue open if I am considering it for the future.
I think for right now I can pull images into the gallery using terraform. But I think it would make more sense to have packer put them there.
Sorry for the late response. CLI information can be found in the announcement.
We would love to see this feature too - its absence feels like a significant gap in the Azure builder. Thanks for the pointer to the CLI docs though.
Throwing my 2-cents behind this as well. This would be a nice value add to packer to save me a step in my CI/CD
Would love to see this feature too, now I have to handle this in a pipeline as a additional post-task in PowerShell.
In agreement with all of the above, if Packer could already add it to the shared image gallery as a post provisioners or something where you can define the image version etc, would save work and speed up any CI/CD process.
Was this added? https://www.packer.io/docs/builders/azure.html shows support for Shared Image Gallery - but I'm getting an error when trying to use it.
@BenMitchell1979 its supported as source but not as a destination.
shared_image_gallery (object) Use a Shared Gallery image as the source for this build
Anyone know if this is in the works? Are people generally using the shell-local post-processor as a workaround?
@bebattis no it is still not supported and yes generally people are using shell for moving the image to shared image gallery.
Not the solution to the problem but thought it might be useful for some. Azure Image builder is in public preview which uses Packer behind the scenes and integrates with the shared image gallery.
See: https://cloudblogs.microsoft.com/opensource/2019/05/07/announcing-the-public-preview-of-azure-image-builder/
I believe #7778 will close this issue -- people can grab binaries of that branch here
Can someone post a GIST or example of their Post-Processor/Packer.json for adding images to SIG?
Hey Ben,
Check out the merged PR: https://github.com/hashicorp/packer/pull/7778
You can specify a SIG in the ARM Builder itself.
From Packer's documentation on the Azure builder:
```
"shared_image_gallery": {
"subscription": "00000000-0000-0000-0000-00000000000",
"resource_group": "ResourceGroup",
"gallery_name": "GalleryName",
"image_name": "ImageName",
"image_version": "1.0.0"
}
@bebattis That's awesome news!! I knew it was being worked on but had not realized it was released with v1.4.2. Thanks!
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
We would love to see this feature too - its absence feels like a significant gap in the Azure builder. Thanks for the pointer to the CLI docs though.