az sql db copy returns mismatched/confusing error message
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
**Describe the bug**
I'd like to say this is more of a DOCs bug maybe?
`az sql db copy` returns a confusing error message when family/f is set to Gen5 and Capacity/c is set to 1:
_"Cound not find sku in tier 'GeneralPurpose' with family 'Gen5', capacity 1. Supported families & capacities for 'GeneralPurpose' are: [(**'Gen5', 1**), ...]."_
**To Reproduce**
`az sql db copy --resource-group $rg --server $svr --name $oldname --dest-name $newname --dest-server $svr --compute-model provisioned -f Gen5 -c 1`
**Expected behavior**
I had already looked at the AZ Portal and saw that 2 vCores was the lowest number of cores you could choose there, so I had some doubt that it would allow me to create a database using only 1 core.
However, reading the official Microsoft Docs [here](https://docs.microsoft.com/en-us/cli/azure/sql/db?view=azure-cli-latest#az_sql_db_copy) shows an example using 1 vCore.
It is quite obvious that the minimum of vCores you are allowed to use is 2, since changing the above command to `-c 2` makes the error message go away. However, when the error message tries to tell you this, it inadvertently shows the very command you tried to execute as being valid. This is further compounded since the Microsoft Docs share this suggestion as well.
Just need the docs and error message to correctly relate reality.
**Environment summary**
I'm on azure-cli 2.0.77, but current Microsoft Docs show this, so I'm doubting version has all that much to do with it.
Contributor guide
Assessment
This issue has not been assessed yet.