No registered resource provider found for location
Command Name
az acr show
Errors:
No registered resource provider found for location 'westeurope' and API version '2019-05-01' for type 'registries'. The supported api-versions are '2016-06-27-preview, 2017-03-01, 2017-10-01, 2017-06-01-preview'. The supported locations are 'westus, eastus, southcentralus, westeurope, northeurope, uksouth, ukwest, australiaeast, australiasoutheast, centralindia, koreacentral, francecentral, southafricanorth, eastasia, japaneast, japanwest, southeastasia, southindia, brazilsouth, canadaeast, canadacentral, centralus, eastus2, northcentralus, westcentralus, westus2'.
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
- create azure container registry
myacrin resource groupmyresourcegroup(e.g. through azure portal) az acr show --name myacr --resource-group myresourcegroup --query "id" --output tsv
Expected Behavior
It returns the ID of the resource
Environment Summary
Linux-5.1.15-arch1-1-ARCH-x86_64-with-arch
Python 3.7.3
Shell: bash
azure-cli 2.0.67
acr 2.2.9
Extensions:
aks-preview 0.4.5
azure-devops 0.11.0
Additional Context
The issue is not reproducible on every machine. Re-installation of azure-cli with or without extensions does not change anything.
The output from az provider list, part related with Microsoft.Cdn:
microsoft.cdn.log
Additionally:
% az provider show -n Microsoft.Cdn --query "resourceTypes[?resourceType=='sites'].locations"
[]
Related community question: https://social.msdn.microsoft.com/Forums/en-US/1ecd2eb5-06ec-41ef-8043-c621f37125df/no-registered-resource-provider-found-for-location?forum=azurescripting
This issue seems to be caused due to conflicting dependencies between the ACR cli package and the ACR management package. The latest azure cli version seems to require a release candidate for azure-mgmt. Workaround is to downgrade azure-mgmt-containerregistry to version 2.8.0.
ERROR: azure-cli-acr 2.2.9 has requirement azure-mgmt-containerregistry==2.8.0, but you'll have azure-mgmt-containerregistry 3.0.0rc3 which is incompatible.
@carbolymer could you please update your azure-cli to 2.0.68 and try again? Thank you.
After update to 2.0.68, the issue no longer persists.