question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unsupported API version '2020-04-01' for Network Resource. MS is fixing it.

See original GitHub issue

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Describe the bug

CLI 2.7.0 fails to run command az network vnet show

To Reproduce

sudo apt-get install -y apt-transport-https
# https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-apt?view=azure-cli-latest
curl -sL https://packages.microsoft.com/keys/microsoft.asc |
    gpg --dearmor |
    sudo tee /etc/apt/trusted.gpg.d/microsoft.asc.gpg > /dev/null

##### git bash for windows based on Ubuntu
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
sudo apt-get update
sudo apt-get install ca-certificates curl apt-transport-https lsb-release gnupg

AZ_REPO=$(lsb_release -cs)
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | 
    sudo tee /etc/apt/sources.list.d/azure-cli.list

sudo apt-get update
apt search azure-cli 
apt-cache search azure-cli 
apt list azure-cli -a
sudo apt-get install azure-cli # azure-cli=2.5.0-1~bionic
sudo apt-get update && sudo apt-get install --only-upgrade -y azure-cli
sudo apt-get upgrade azure-cli
az login

az vm create --name $bastion_name \
    --image UbuntuLTS \
    --admin-username $bastion_admin_username \
    --resource-group $rg_bastion_name \
    --vnet-name $vnet_bastion_name \
    --subnet ManagementSubnet \
    --nsg $b_nsg \
    --size Standard_B1s \
    --zone 1 \
    --location $location \
    --ssh-key-values ~/.ssh/$ssh_key.pub

vnet_id=$(az network vnet show --resource-group $rg_name --name $vnet_name --query id -o tsv)
echo "VNet Id :" $vnet_id	

master_subnet_id=$(az network vnet subnet show --name $master_subnet_name --vnet-name $vnet_name  -g $rg_name --query id -o tsv)
echo "Master Subnet Id :" $master_subnet_id	

worker_subnet_id=$(az network vnet subnet show --name $worker_subnet_name --vnet-name $vnet_name -g $rg_name --query id -o tsv)
echo "Worker Subnet Id :" $worker_subnet_id	

ilb_subnet_id=$(az network vnet subnet show --resource-group $rg_name --vnet-name  $vnet_name --name $ilb_subnet_name --query id -o tsv)
echo "Internal Load BalancerLB Subnet Id :" $ilb_subnet_id	

bastion_vnet_id=$(az network vnet show --name $vnet_bastion_name -g $rg_bastion_name --query id -o tsv)
echo "Bastion VNet Id :" $bastion_vnet_id	

bastion_subnet_id=$(az network vnet subnet show --name $subnet_bastion_name --vnet-name $vnet_bastion_name -g $rg_bastion_name --query id -o tsv)
echo "Bastion Subnet Id :" $bastion_subnet_id	

acr_registry_id=$(az acr show --name $acr_registry_name --resource-group $rg_name --query "id" --output tsv)
echo "ACR registry ID :" $acr_registry_id

Expected behavior

az network vnet show command should run successfully

Environment summary

az version { “azure-cli”: “2.7.0”, “azure-cli-command-modules-nspkg”: “2.0.3”, “azure-cli-core”: “2.7.0”, “azure-cli-nspkg”: “3.0.4”, “azure-cli-telemetry”: “1.0.4”, “extensions”: {} }

Additional context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:13
  • Comments:25 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
mmyyrroonncommented, Jun 4, 2020

I have the same issue with publicIPAddresses.

When can we expect a fix and is there a workaround?

I believe this issue should be fixed soon.

A workaround is to use old version of Azure CLI. Please uninstall the 2.7.0 and install any older version. It uses 2020-03-01 api-version or before which are not affected.

1reaction
gstolzcommented, Jun 4, 2020

Microsoft has fixed the problem on Azure backend side. For me az cli 2.7.0 (on Ubuntu 20.04) seems to work again!

PRELIMINARY ROOT CAUSE: Engineers determined that a recent deployment contained a configuration bug, which caused requests through the ARM deployment and management service to fail. MITIGATION: Engineers rolled back the faulty configuration safely, which mitigated the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

API-version wrong when creating linked service for Data Lake ...
Hey, I got this error when trying to create a linked service for Azure Data Lake Analytics on Data Factory:.
Read more >
AspnetCore 3.1 API giving UnsupportedApiVersion
... I have to update the routes in ApiRoutes.cs to remove the api/v# part so that it isn't duplicated but doing that seems...
Read more >
Visual C++ 16.3 runtime uses an unsupported API for UWP ...
Yes, to downgrade you have to uninstall the current version. See https://docs.microsoft.com/en-us/visualstudio/releases/2019/history for the full procedure. I'd ...
Read more >
Unsupported api version error - Support | Snipcart
“The HTTP resource that matches the request URI https://payment.snipcart.com/api/public/sessions with API version '2019-05-21' does not ...
Read more >
Permissions - CVE - Search Results
OpenSearch version 1.3.7 and 2.4.0 contain a fix for this issue. ... interface where you can configure NTP servers (Network Time Protocol) via...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found