Trying to create an Azure Database for PostgreSQL flexible server with same server name which was deleted

Likith Jutur 0 Reputation points
2024-06-01T07:01:10.1633333+00:00

I am trying to create an Azure Database for PostgreSQL flexible server with same server name which was deleted using terraform but running into the below error. Tried creating using Azure Portal and no luck there as getting the same error there also.

Error: creating Flexible Server (Subscription: "Subscription_ID"
│ Resource Group Name: "Resource_Group_Name"
│ Flexible Server Name: "Server_Name"): polling after Create: polling failed: the Azure API returned the following error:
│
│ Status: "ServerGroupDropping"
│ Code: ""
│ Message: "Operations on a server group in dropping state are not allowed."
│ Activity Id: ""
│
│ ---
│
│ API Response:
│
│ ----[start]----
│ {"name":"retracted","status":"Failed","startTime":"2024-06-01T06:37:12.393Z","error":{"code":"ServerGroupDropping","message":"Operations on a server group in dropping state are not allowed."}}
│ -----[end]-----

Azure Database for PostgreSQL
{count} votes

2 answers

Sort by: Most helpful
  1. akinbade abiola 6,735 Reputation points
    2024-06-01T10:35:27.1666667+00:00

    Hello Likith Jutur,

    Thanks for your question.

    The error message points to the server being in a dropping" state, meaning the server deletion has not yet been fully completed. When an Azure PostgreSQL Flexible Server resource is dropped it marks the instance as no longer in use (after which the customer is no longer billed for the resource) following which it proceeds to clean-up the internal resources associated with the instance.

    This server name already exists and you need to provide a unique server name.

    See external doc: https://registry.terraform.io/modules/intel/azure-postgresql-flexible-server/intel/latest/examples/intel-optimized-pgsql-flexible-server-db_parameters

    Please let me know if you have further questions**

    You can mark it 'Accept Answer' if this helped.

    0 comments No comments

  2. Rahul Randive 9,011 Reputation points Microsoft Employee
    2024-06-01T12:25:05.82+00:00

    Hi @Likith Jutur

    You may be encountering an error due to an internal DNS cache may needs to be cleared. However, Azure PostgreSQL Flexible Server does not guarantee the reusability of the same name once a resource has been dropped.

    If using a different name is not an issue, you can create a server with a different name. If you need to use the same name then you may need to open a support case to clean up the backend operation.

    Thank You!

    0 comments No comments