Postgresql flexible server parameter set up is failing with server busy error

Manikandan M 0 Reputation points


I am trying to deploy Azure Postgresql flexible server through Bicep and GHA pipelines, the deployment is failing in configuration step with the following error, i am trying to deploy pg 16 version. can someone please help with this issue.

"message":"The resource write operation failed to complete successfully, because it reached terminal provisioning state 'Failed'.","details":[{"code":"ServerBusy","message":"Server 'XXX' is busy with another operation. Please try again later."}]}]}]}

Azure Database for PostgreSQL
{count} votes

1 answer

Sort by: Most helpful
  1. Oury Ba-MSFT 17,061 Reputation points Microsoft Employee

    @Manikandan M

    Sorry about the comment I provided above regarding deploying an Azure PostgreSQL Flexible server version 16 using biceps.

    I was able to test this, and it was successfully.

    I did a test by creating a biceps template to deploy an azure PostgreSQL Flexible server public access.

    Below is the sample, and you can change the Sku, tier, storage, and other variables based on your needs, and add others based on our documentation deployment-language-bicep.

    @description('The name of the PostgreSQL Flexible Server')
    param serverName string = 'name-postgres-server1'
    @description('The administrator username for the Flexible Server')
    param adminUsername string
    @description('The administrator password for the Flexible Server')
    param adminPassword string
    @description('The storage size in GiB for the Flexible Server')
    param storageSizeGb int = 32
    @description('The backup retention days for the Flexible Server')
    param backupRetentionDays int = 7
    @description('The location of the resources')
    param location string = resourceGroup().location
    resource postgreSqlFlexibleServer 'Microsoft.DBforPostgreSQL/flexibleServers@2023-06-01-preview' = {
      name: serverName
      location: location
     sku: {
        name: 'Standard_D4ds_v5'
        tier: 'GeneralPurpose'
      properties: {
        administratorLogin: adminUsername
        administratorLoginPassword: adminPassword
        version: '13'
    	network: {  
    	 publicNetworkAccess: 'Disabled'  
        storage: {
          storageSizeGB: storageSizeGb
        backup: {
          backupRetentionDays: backupRetentionDays
        highAvailability: {
          mode: 'Disabled'

    You can save the file, then run the deployment using CLI in the Azure Portal.

    And run the deployment:

    az deployment group create --resource-group Rgname --template-file <BicepFileName> --parameters adminUsername=adminname adminPassword="password"

    Please see image below

    You need to upload the file, then Open Azure CLI to run the above code.

    User's image

    Hope that clarifies.

    Note: If you are deploying using private access the template will be different.

    Please don't forget to mark as accept answer if the reply was helpful so that others experiencing the same thing can easily reference this.