Closed jercle closed 5 months ago
Could be related to https://github.com/Azure/azure-cli/issues/28700 (https://github.com/Azure/azure-cli/issues/28700#issuecomment-2048212517) or an issue with Azure's underlying API
Also, there's a new field in the GalleryArtifactVersionFullSource
struct which should solve the issue by updating the used sdk and passing the value there
VirtualMachineID
in struct GalleryArtifactVersionFullSource
Also looks to be available in resource-manager/compute/2023-07-03
Having a look through the tags, the earliest available version of github.com/hashicorp/go-azure-sdk/resource-manager is v0.20240403.1161138
Pinning at least v0.20240403.1161138 of github.com/hashicorp/go-azure-sdk/resource-manager and VirtualMachineID here should resolve this issue
Ah yeah, seems like we need to send the new VirtualMachineID field instead of ID for that case, but I think we still need to send ID if the build is sourced from a managed image and not a VM, I'll work on getting a fix out for that shortly, thanks for reporting and your investigation
Overview of the Issue
Until the last week or so, we have been building images in one subscription then saving them in a Shared Image Gallery in another subscription. This is now failing with the following error:
Reproduction Steps
Run any packer build that builds an image, then saves the image to a SIG in another subscription
Plugin and Packer version
Packer v1.10.1 Failed on both versions of azure plugin. Previously functional on v2.0.2, only installed v2.1.0 after failures began. packer-plugin-azure_v2.0.2_x5.0_linux_amd64 packer-plugin-azure_v2.1.0_x5.0_linux_amd64
Simplified Packer Buildfile
Operating system and Environment details
Ubuntu x86-64 22.04