Skip to content

az postgres flexible-server restore failing with code "NoRegisteredProviderFound" #32259

@nnellanspdl

Description

@nnellanspdl

Describe the bug

Here is my full command:

az postgres flexible-server restore \
  --restore-time <time> \
  --source-server <sourceServerName> \
  --resource-group <rgName> \
  --name <newServerName> \
  --private-dns-zone <resourceIdExistingZone> \
  --subnet <resourceIdExistingSubnet> \
  --debug

I am trying to create a new restore server from a backup.

I'm attempting to use an existing Virtual Network, so I am supplying the --subnet switch and pointing it at the full resource ID of the existing subnet.

In the debug logs I can see an API call that is attempting to capture information about this existing virtual network: DEBUG: urllib3.connectionpool: [https://management.azure.com:443](https://management.azure.com/) "GET /subscriptions/<mySub>/resourcegroups/<myRG>/providers/Microsoft.Network//virtualNetworks/<myVnet>?api-version=2025-05-01 HTTP/1.1" 400 1738

Observation: I see a double slash // in the path above, could that be a problem?

This API call fails with a 400 error, here is the error: DEBUG: cli.azure.cli.core.sdk.policies: {"error":{"code":"NoRegisteredProviderFound","message":"No registered resource provider found for location 'centralus' and API version '2025-05-01' for type 'virtualNetworks'. The supported api-versions are '2014-12-01-preview, 2015-05-01-preview, 2015-06-15, 2016-03-30, 2016-06-01, 2016-07-01, 2016-08-01, 2016-09-01, 2016-10-01, 2016-11-01, 2016-12-01, 2017-03-01, 2017-04-01, 2017-06-01, 2017-08-01, 2017-09-01, 2017-10-01, 2017-11-01, 2018-01-01, 2018-02-01, 2018-03-01, 2018-04-01, 2018-05-01, 2018-06-01, 2018-07-01, 2018-08-01, 2018-10-01, 2018-11-01, 2018-12-01, 2019-02-01, 2019-04-01, 2019-06-01, 2019-07-01, 2019-08-01, 2019-09-01, 2019-11-01, 2019-12-01, 2020-01-01, 2020-03-01, 2020-04-01, 2020-05-01, 2020-06-01, 2020-07-01, 2020-08-01, 2020-11-01, 2021-01-01, 2021-02-01, 2021-03-01, 2021-04-01, 2021-05-01, 2021-06-01, 2021-08-01, 2021-12-01, 2022-01-01, 2022-05-01, 2022-07-01, 2022-09-01, 2022-11-01, 2023-02-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01, 2024-03-01, 2024-05-01, 2024-07-01, 2024-10-01, 2025-01-01, 2025-03-01'. The supported locations are 'westus, eastus, northeurope, westeurope, eastasia, southeastasia, northcentralus, southcentralus, centralus, eastus2, japaneast, japanwest, brazilsouth, australiaeast, australiasoutheast, centralindia, southindia, westindia, canadacentral, canadaeast, westcentralus, westus2, ukwest, uksouth, koreacentral, koreasouth, francecentral, australiacentral, southafricanorth, uaenorth, switzerlandnorth, germanywestcentral, norwayeast, westus3, jioindiawest, swedencentral, qatarcentral, polandcentral, italynorth, israelcentral, mexicocentral, spaincentral, newzealandnorth, indonesiacentral, chilecentral, malaysiawest, austriaeast'."}}

Since it can't pull information about the existing Virtual Netwok, the az command then falls back to trying to create a brand new Virtual Network for this restore server. This is NOT what I want, I want to use an existing Virtual Network.

I've tried multiple version of Azure CLI, 2.68, 2.72, and the latest 2.78. All of them fail with this same problem.

Related command

az postgres flexible-server restore
--restore-time
--source-server
--resource-group
--name
--private-dns-zone
--subnet
--debug

Errors

DEBUG: cli.azure.cli.core.sdk.policies: {"error":{"code":"NoRegisteredProviderFound","message":"No registered resource provider found for location 'centralus' and API version '2025-05-01' for type 'virtualNetworks'. The supported api-versions are '2014-12-01-preview, 2015-05-01-preview, 2015-06-15, 2016-03-30, 2016-06-01, 2016-07-01, 2016-08-01, 2016-09-01, 2016-10-01, 2016-11-01, 2016-12-01, 2017-03-01, 2017-04-01, 2017-06-01, 2017-08-01, 2017-09-01, 2017-10-01, 2017-11-01, 2018-01-01, 2018-02-01, 2018-03-01, 2018-04-01, 2018-05-01, 2018-06-01, 2018-07-01, 2018-08-01, 2018-10-01, 2018-11-01, 2018-12-01, 2019-02-01, 2019-04-01, 2019-06-01, 2019-07-01, 2019-08-01, 2019-09-01, 2019-11-01, 2019-12-01, 2020-01-01, 2020-03-01, 2020-04-01, 2020-05-01, 2020-06-01, 2020-07-01, 2020-08-01, 2020-11-01, 2021-01-01, 2021-02-01, 2021-03-01, 2021-04-01, 2021-05-01, 2021-06-01, 2021-08-01, 2021-12-01, 2022-01-01, 2022-05-01, 2022-07-01, 2022-09-01, 2022-11-01, 2023-02-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01, 2024-03-01, 2024-05-01, 2024-07-01, 2024-10-01, 2025-01-01, 2025-03-01'. The supported locations are 'westus, eastus, northeurope, westeurope, eastasia, southeastasia, northcentralus, southcentralus, centralus, eastus2, japaneast, japanwest, brazilsouth, australiaeast, australiasoutheast, centralindia, southindia, westindia, canadacentral, canadaeast, westcentralus, westus2, ukwest, uksouth, koreacentral, koreasouth, francecentral, australiacentral, southafricanorth, uaenorth, switzerlandnorth, germanywestcentral, norwayeast, westus3, jioindiawest, swedencentral, qatarcentral, polandcentral, italynorth, israelcentral, mexicocentral, spaincentral, newzealandnorth, indonesiacentral, chilecentral, malaysiawest, austriaeast'."}}

Issue script & Debug output

See above

Expected behavior

Restore postgres flexible backup to a new server in an existing Virtual Network & Subnet.

Environment Summary

azure-cli 2.78.0

core 2.78.0
telemetry 1.1.0

Extensions:
azure-devops 1.0.2

Dependencies:
msal 1.34.0b1
azure-mgmt-resource 23.3.0

Python location '/opt/az/bin/python3'
Config directory '/home/AzDevOps/.azure'
Extensions directory '/opt/az/azcliextensions'

Python (Linux) 3.13.7 (main, Oct 9 2025, 05:50:17) [GCC 13.3.0]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

No response

Metadata

Metadata

Labels

Auto-AssignAuto assign by botAuto-ResolveAuto resolve by botPostgreSQLService AttentionThis issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions