An Azure managed PostgreSQL database service for app development and deployment.
Hello , Welcome to MS Q&A
This looks like an Azure “ghost resource” issue where the Azure Resource Manager (ARM) and the PostgreSQL service are not in sync.
ARM thinks the PostgreSQL server has already been deleted or is still being deleted, which is why it returns “resource doesn’t exist” when you try to delete it.
However, the PostgreSQL backend still has the server recorded, so when you try to create a new server with the same name, it says the resource already exists.
Because the resource is stuck in this state, the resource group also cannot be deleted normally.
The first thing to try is a direct ARM deletion using the resource ID:
az resource delete --ids "<FULL-RESOURCE-ID>"
After running this, wait a few minutes and check the Azure portal again.
If that doesn't work, try using Azure Resource Explorer:
Go to your subscription → Resource Groups → your resource group → Microsoft.DBforPostgreSQL → flexibleServers.
Find the stuck PostgreSQL server, select it, and use the Delete option to send a direct delete request.
Basically, the issue is that Azure's different services have different states for the same resource. The goal is to force the resource to be deleted and get everything back in sync.
Pls check and let me know if any further ques
Thanks
Deepanshu