[Utilities] Detect deployments to API versions that do not exist in regions that are used for modules testing
- Dominant language
- PowerShell
- Stars
- 737
- Forks
- 436
- Avg merge
- 10d 7h
- Merged PRs (30d)
- 1
Description
@eriqua
Having updated the API to the latest stable version `2022-09-09`. I see there are some limitations in relation to the region where that API is available., although it is documented in the [template reference doc](https://learn.microsoft.com/en-us/azure/templates/microsoft.desktopvirtualization/2022-09-09/scalingplans?pivots=deployment-language-bicep)
```powershell
Status Message: No registered resource provider found for location 'westeurope' and API version '2022-09-09' for type 'scalingplans'. The supported api-versions are '2019-01-23-preview, 2019-09-24-preview, 2019-12-10-preview, 2020-09-21-preview, 2020-10-19-preview, 2020-11-02-preview, 2020-11-10-preview, 2021-01-14-preview, 2021-02-01-preview, 2021-03-09-preview, 2021-04-01-preview, 2021-05-13-preview, 2021-09-03-preview, 2022-01-12-privatepreview, 2022-02-10-preview, 2022-04-01-preview, 2021-07-12'. The supported locations are 'uksouth, ukwest, japaneast, australiaeast, canadaeast, canadacentral, northeurope, westeurope, eastus, eastus2, westus, westus2, westus3, northcentralus, southcentralus, westcentralus, centralus'. (Code:NoRegisteredProviderFound)
Status Message: At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details. (Code: DeploymentFailed)
- {
"error": {
"code": "NoRegisteredProviderFound",
"message": "No registered resource provider found for location 'westeurope' and API version '2022-09-09' for type 'scalingplans'. The supported api-versions are '2019-01-23-preview, 2019-09-24-preview, 2019-12-10-preview, 2020-09-21-preview, 2020-10-19-preview, 2020-11-02-preview, 2020-11-10-preview, 2021-01-14-preview, 2021-02-01-preview, 2021-03-09-preview, 2021-04-01-preview, 2021-05-13-preview, 2021-09-03-preview, 2022-01-12-privatepreview, 2022-02-10-preview, 2022-04-01-preview, 2021-07-12'. The supported locations are 'uksouth, ukwest, japaneast, australiaeast, canadaeast, canadacentral, northeurope, westeurope, eastus, eastus2, westus, westus2, westus3, northcentralus, southcentralus, westcentralus, centralus'."
}
} (Code:BadRequest)
```
Do we have a CARML defined preference on using an API that is available in most regions vs. just the latest version?
_Originally posted by @ahmadabdalla in https://github.com/Azure/ResourceModules/issues/2536#issuecomment-1378684253_
Contributor guide
Assessment
This issue has not been assessed yet.