I am working on a Terraform/OpenTofu-based deployment in Azure and attempted to destroy a PostgreSQL Flexible Server instance (foggykitchen-pg
) using the azurerm_postgresql_flexible_server
resource. The deletion was triggered via tofu destroy
.
While the command appeared to proceed normally, the server entered a Dropping
state and has remained stuck in that state for several hours now. According to the Azure Portal, the server is still visible but unresponsive to any further deletion attempts, either via CLI or manually in the Portal. All attempts to re-delete the resource return a ResourceNotFound
error, even though the instance clearly still appears under "Azure Database for PostgreSQL flexible servers" with state = Dropping.
Here’s a sample CLI output for reference:
az postgres flexible-server show --name foggykitchen-pg --resource-group foggykitchen-rg1
...
"state": "Dropping",
"fullyQualifiedDomainName": "foggykitchen-pg.postgres.database.azure.com",
...
az postgres flexible-server delete --name foggykitchen-pg --resource-group foggykitchen-rg1 --yes
(ResourceNotFound) The requested resource of type 'Microsoft.DBforPostgreSQL/flexibleServers' with name 'foggykitchen-pg' was not found.
Also, the parent resource group foggykitchen-rg1
is stuck in a "Deleting..." state, likely because this resource is not fully removed.
Has anyone encountered this before? Does the deletion eventually succeed on its own (i.e., the backend completes the operation after several hours)? Or should I open a support request to have the backend forcibly remove it?
Any insight or guidance would be very much appreciated — this is currently blocking automation and testing workflows.
Thanks!
Martin (FoggyKitchen.com)