Customer feedback | az vmss create | SpotRestorePolicy Error: "InvalidParameter"
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
### Describe the bug
This GitHub issue is being moved from azure-docs-cli [4474](https://github.com/MicrosoftDocs/azure-docs-cli/issues/4474).
Here is a customer screen print of the reference command parameters and error:

***************************************
**Type of issue**
Code doesn't work
**Feedback**
When using this example code (with changed values for Image and ResourceGroup)
"az vmss create -n MyVmss -g MyResourceGroup --location NorthEurope --instance-count 2 --image CentOS85Gen2 --priority Spot --eviction-policy Deallocate --single-placement-group --enable-spot-restore True --spot-restore-timeout PT1H"
I get the Error "DeploymentFailed" and the details:
"code":"InvalidParameter","target":"spotRestorePolicy","message":"The value of parameter spotRestorePolicy is invalid."
(On Cloud-Shell with az --version = 2.62.0)
I also tried to set "--single-placement-group false --enable-spot-restore false" - this then worked and a vmss was deployed.
(I also tried " --single-placement-group false --enable-spot-restore true" yielding the same invalid parameter response.)
**Page URL**
https://learn.microsoft.com/en-us/cli/azure/vmss?view=azure-cli-latest
**Content source URL**
https://github.com/MicrosoftDocs/azure-docs-cli/blob/main/latest/docs-ref-autogen/vmss.yml
***************************************
### Related command
az vmss create
### Errors
Invalid parameter, spotRestorePolicy...The value of parameter spotRestorePolicy is invalid.
### Issue script & Debug output
n/a
### Expected behavior
n/a
### Environment Summary
Cloud-Shell with az --version = 2.62.0
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.