Troubleshoot SkuNotAvailable in Azure Database for PostgreSQL Flexible Server

rob 0 Reputation points
2026-10-10T02:26:35.83+00:00

When provisioning a new PostgreSQL instance it failed.
It's been over an hour and the failed instance hasn't cleared.

I can't create a new instance with the same name because of this.

The current blocker is InvalidResourceLocation, not SkuNotAvailable.

How do I remove this failed non-sku'd instance?

Azure Database for PostgreSQL

2 answers

Sort by: Most helpful
  1. Walker Pollitt 320 Reputation points
    2026-10-10T15:17:41.1066667+00:00

    Since you've already attempted the recommended deletion steps and the resource still appears after more than two hours, I would stop repeating the delete operations and investigate a possible inconsistency between Azure Resource Manager (ARM) and the PostgreSQL resource provider.

    The important clue is that the resource remains visible while management operations return "ResourceNotFound" or "InvalidResourceLocation".

    1. Compare the two resource views

    Run these read-only commands against the correct subscription:

    az account show --query "{id:id,name:name}" -o json

    az resource show \

    --resource-group "<resource-group>" \

    --resource-type "Microsoft.DBforPostgreSQL/flexibleServers" \

    --name "<server-name>" \

    --query "{id:id,location:location,provisioningState:properties.provisioningState}" \

    -o json

    az postgres flexible-server show \

    --resource-group "<resource-group>" \

    --name "<server-name>" \

    -o json

    If ARM returns a resource but the PostgreSQL-specific command returns "ResourceNotFound", preserve both outputs. That discrepancy is more useful for escalation than another unsuccessful delete attempt.

    1. Capture the original provisioning failure

    Open the resource group in the Azure portal, then review Deployments and Activity log.

    Capture the original failed provisioning operation and subsequent failed delete operations, including their timestamps, error codes, and correlation IDs.

    This helps Microsoft distinguish the original "SkuNotAvailable" failure from the current resource-cleanup problem.

    1. Request provider-side reconciliation

    Microsoft has documented similar PostgreSQL Flexible Server cases in which an ARM cache refresh or backend investigation was needed to remove a stranded resource.

    Ask Azure PostgreSQL support to reconcile the ARM resource record, PostgreSQL resource-provider state, and any retained server-name reservation.

    There is no documented customer-facing force-delete operation that reliably resolves a resource-provider record that is no longer recognized.

    1. If deployment is urgent

    Consider provisioning a new Flexible Server with a different server name, after verifying that the intended region, SKU, quota, and networking configuration are supported.

    A different name may allow you to continue development while the original resource is investigated. However, it will not remove the stranded resource or guarantee that regional capacity restrictions have been resolved.

    References:

    One clarification: Does "az resource show" still return the failed server while "az postgres flexible-server show" returns "ResourceNotFound"?

    If so, that would strengthen the case for an inconsistent control-plane record requiring Microsoft intervention.

    Prepared with AI assistance.

    Was this answer helpful?


  2. AI answer

    2026-10-10T02:27:20.37+00:00

    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:

    1. In the Azure portal, open the affected resource or resource group.
    2. Select Support + Troubleshooting under Help.
    3. If the suggested diagnostics do not resolve it, select Create a support request.^3^
    4. Include:
      • Subscription and resource-group names.
      • PostgreSQL server name and requested region.
      • Exact InvalidResourceLocation response.
      • 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

    1. Delete a server in Azure Database for PostgreSQL flexible server
    2. Azure Resource Manager resource group and resource deletion
    3. Create an Azure support request
    4. How to delete a PostgreSQL Flexible database in a failed provisioning state? - Microsoft Q&A
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.