virtualMachineScaleSet ARM template fails to deploy if spot restoration fields are present
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
> ### `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
Contributor guide
Assessment
This issue has not been assessed yet.