azure-cli: Latest API version not available in sovereign clouds

Previously reported by

Symptom

We have a centralized location to define API versions for each resource provider:

https://github.com/Azure/azure-cli/blob/daa568579dbaec5af1ac92d261014cf9ce3ff9b1/src/azure-cli-core/azure/cli/core/profiles/_shared.py#L154-L158

Azure CLI supports 4 clouds, including 3 sovereign clouds:

  • AzureCloud
  • AzureChinaCloud
  • AzureUSGovernment
  • AzureGermanCloud

All of them use the same latest profile and the same API version for each resource provider.

However, it happens frequently that a new API version is only deployed to AzureCloud, but not other clouds. Using Azure CLI to call that API version leads to error like:

NoRegisteredProviderFound - No registered resource provider found for location ‘chinanorth’ and API version ‘2019-06-15-preview’ for type ‘profiles/endpoints’. The supported api-versions are ‘2015-06-01, 2016-04-02, 2016-10-02, 2017-04-02, 2017-10-12, 2018-04-02, 2019-04-15’. The supported locations are ‘chinanorth, chinanorth2, chinaeast, chinaeast2’.

Temporary workaroud

Install previous versions of Azure CLI that use old API versions in sovereign clouds. The installation document has detailed instruction on how to install previous versions: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli

Solution

Service team should deploy the new API version to all clouds synchronously.

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 1
  • Comments: 16 (4 by maintainers)

Most upvoted comments

Unlike the issue title suggests this issue is not just affecting sovereign clouds, but also the Azure public cloud. See https://github.com/Azure/azure-cli/issues/26813 and https://github.com/Azure/azure-cli/issues/26814

Previously reported by

Symptom

We have a centralized location to define API versions for each resource provider:

https://github.com/Azure/azure-cli/blob/daa568579dbaec5af1ac92d261014cf9ce3ff9b1/src/azure-cli-core/azure/cli/core/profiles/_shared.py#L154-L158

Azure CLI supports 4 clouds, including 3 sovereign clouds:

  • AzureCloud
  • AzureChinaCloud
  • AzureUSGovernment
  • AzureGermanCloud

All of them use the same latest profile and the same API version for each resource provider.

However, it happens frequently that a new API version is only deployed to AzureCloud, but not other clouds. Using Azure CLI to call that API version leads to error like:

NoRegisteredProviderFound - No registered resource provider found for location ‘chinanorth’ and API version ‘2019-06-15-preview’ for type ‘profiles/endpoints’. The supported api-versions are ‘2015-06-01, 2016-04-02, 2016-10-02, 2017-04-02, 2017-10-12, 2018-04-02, 2019-04-15’. The supported locations are ‘chinanorth, chinanorth2, chinaeast, chinaeast2’.

Temporary workaroud

Install previous versions of Azure CLI that use old API versions in sovereign clouds. The installation document has detailed instruction on how to install previous versions: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli

Solution

Service team should deploy the new API version to all clouds synchronously.

Hello,

I am using Azure Portal -> cloud shell, could you suggest how to work around this issue?