Closed ianpittwood closed 1 week ago
Hey @ianpittwood can you verify if this issue is still occurring for you, I believe something in the upgrade to v2 fixed this improper template generation, maybe just a deployment API version bump fixed this.
When I try using v1.4.5 of the plugin I am able to reproduce this error, but using the newest version of the plugin (v2.1.6 as of writing) I am able to successfully build a SIG based VM with spot pricing, and capture it in an image version with a template similar to your provided one.
There are a few breaking changes in v2 https://github.com/hashicorp/packer-plugin-azure/releases/tag/v2.0.0 called out in the release notes but I don't think any of those apply to your template, as you aren't using VHD builds, or interactive authentication
I am closing this issue as we haven't heard back in a few months and it doesn't appear to happen on newer versions, please re-open it if you are experiencing it still
Overview of the Issue
Recently, I started attempting to upgrade from VHD image artifacts to using Shared Image Galleries to store our images. We do our image builds in a sequence of
Base -> Product Base -> Product
whereBase
uses the latest LTS for Ubuntu from the Marketplace. Building theBase
image works fine after switching out the VHD-related variables for Shared Image Gallery blocks, but past that we're experiencing failures that seem related to spot pricing. When building off theBase
image we first create forProduct Base
from a Shared Gallery Image with spot pricing configured, we get the following error during Packer's deployment of temporary build resources:If spot pricing configurations are removed, everything works fine. This seems to be specific to when you combine a Shared Gallery Image source base image with a spot pricing configuration.
Reproduction Steps
spot
pricing configuration block to the source.Plugin and Packer version
Packer v1.10.0 Azure Plugin v1.4.5
Simplified Packer Buildfile
Operating system and Environment details
OS: Ubuntu 22.04 Architecture: x86_64
Log Fragments and crash.log files
Azure Build Log
``` byol.azure-arm.azure-byol: output will be in this color. ==> byol.azure-arm.azure-byol: Running builder ... ==> byol.azure-arm.azure-byol: Getting tokens using Azure CLI ==> byol.azure-arm.azure-byol: Getting tokens using Azure CLI byol.azure-arm.azure-byol: Creating Azure Resource Manager (ARM) client ... ==> byol.azure-arm.azure-byol: Getting source image id for the deployment ... ==> byol.azure-arm.azure-byol: -> SourceImageName: '/subscriptions/