An Azure managed PostgreSQL database service for app development and deployment.
Delete the failed PostgreSQL Flexible Server with the service-specific Azure CLI command; if that request returns InvalidResourceLocation or cannot find a server that still reserves the name, Microsoft support must clear the stranded Azure Resource Manager record.
1. Submit the supported delete request
Run this in Azure Cloud Shell or an authenticated Azure CLI session:
az account set --subscription "<subscription-name-or-id>"
az postgres flexible-server delete \
--resource-group "<resource-group>" \
--name "<server-name>" \
--yes
This is the documented delete operation for PostgreSQL Flexible Server.^1^
Deletion is irreversible. After the command completes, verify whether Azure Resource Manager still has the resource:
az resource show \
--resource-group "<resource-group>" \
--resource-type "Microsoft.DBforPostgreSQL/flexibleServers" \
--name "<server-name>"
A ResourceNotFound result means the record has been removed and the name should become reusable after control-plane propagation.
2. If the PostgreSQL command cannot address the stranded record
If the resource appears in az resource show but the PostgreSQL-specific delete command cannot remove it, try deleting the ARM resource directly:
az resource delete \
--resource-group "<resource-group>" \
--resource-type "Microsoft.DBforPostgreSQL/flexibleServers" \
--name "<server-name>"
Azure Resource Manager documents az resource delete as the generic deletion mechanism for an individual resource.^2^
Do not delete the entire resource group unless it is disposable: resource-group deletion is irreversible and also removes its other resources. If deletion is blocked before reaching the provider, check the resource, resource-group, and subscription scopes for CanNotDelete or ReadOnly locks; locks can prevent deletion.^2^
3. Escalate if InvalidResourceLocation remains
If either delete request returns InvalidResourceLocation, or both listing and deletion say the server does not exist while its name remains unavailable, stop retrying creation with that name and open an Azure support request:
- In the Azure portal, open the affected resource or resource group.
- Select Support + Troubleshooting under Help.
- If the suggested diagnostics do not resolve it, select Create a support request.^3^
- Include:
- Subscription and resource-group names.
- PostgreSQL server name and requested region.
- Exact
InvalidResourceLocationresponse. - UTC time of the failed provisioning and delete attempts.
- Correlation ID from Resource group → Deployments or Monitor → Activity log.
- Output from both delete commands and
az resource show.
Request removal of the stranded Microsoft.DBforPostgreSQL/flexibleServers ARM/provider record and an ARM cache refresh. In the matching failed-provisioning case, the Flexible Server could not be deleted or properly enumerated; Microsoft refreshed the ARM cache from the backend, after which the stranded server disappeared from the portal.^4^
SkuNotAvailable explains the original provisioning failure, but it is no longer the operation blocking cleanup. The actionable failure for support is the current InvalidResourceLocation response and the retained name.
References