azure-cli: "az vm image terms accept" failure in AzureUSGovernment sovereign cloud when using --urn to identify image
az feedback
auto-generates most of the information requested below, as of CLI version 2.0.62
Describe the bug
When connected with to Azure Government using az cli
when I go to accept the terms of a Marketplace image with az vm image terms accept --urn {your image urn}
it throws the below error:
(NoRegisteredProviderFound) No registered resource provider found for location ‘global’ and API version ‘2020-12->01’ for type ‘locations/publishers’. The supported api-versions are ‘2015-05-01-preview, 2015-06-15, 2016-03-30, >2016-04-30-preview, 2016-08-30, 2017-03-30, 2017-12-01, 2018-04-01, 2018-06-01, 2018-10-01, 2019-03-01, 2019->07-01, 2019-12-01, 2020-06-01, 2020-09-30, 2020-12-01, 2021-03-01’. The supported locations are ‘usgoviowa, >usgovvirginia, usdodcentral, usdodeast, usgovtexas, usgovarizona’.
To Reproduce
- Log into Azure Government
- Launch a new Cloud Shell session
- Run the following command:
az vm image terms accept --urn cisco:cisco-csr-1000v:16_10-payg-sec:16.10.120190108 --debug
Expected behavior
- I would expect to be able to accept the license terms programmatically with the above command.
Environment summary
- Leveraging AZ CLI 2.23.0, from within an Azure Government Cloud Shell Session (pre-installed)
Additional context N/A
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 19 (8 by maintainers)
Confirming, that in my test using 2.28.0 CLI from Azure Government Cloud Shell, I was able to run the previously impacted CLI command to accept terms based on URN.