Skip to content

virtualMachineScaleSet ARM template fails to deploy if spot restoration fields are present #20576

@CameronMcAuley

Description

@CameronMcAuley

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Describe the bug
The spot restoration feature is included on a new VMSS via ARM template by including spotRestorePolicy which includes a boolean field called enabled.
However, this only works when priority is set to Spot. If priority is set to Regular, the template will fail to deploy with Spot restoration feature is supported only for Azure Spot Virtual Machine Scale Sets, regardless of the whether the boolean enabled field for spotRestorePolicy is set to false.

The only solution right now is to have 2 separate templates, one for spot and one for regular VMSS

To Reproduce

  • Create a VMSS ARM template with priority of 'Regular', creating a non-spot VMSS
  • Include the spotRestorePolicy field and try changing the enabled field to true or false. Both will fail.

Expected behavior
Logically, it should be possible to create a template of priority Spot or a template of priority Regular, and still include this field.
When priority == Regular and spotRestorePolicy -> false, the template should still deploy.

Environment summary
Mac OS (Big Sur) 11.5.1. Azure CLI version 2.30.0. API version 2021-07-01 for virtualMachineScaleSets in ARM template.

Additional context
N/A

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions