Postgresql flexibleserver creation is failing with "AttributeError: 'FlexibleServerCapability' object has no attribute 'supported_features'" from Azure CLI

Manohar Amkem 0 Reputation points
2025-04-09T07:07:30.43+00:00

Hi Team,

I am very new Azure and I have an OpenSUSE vm with latest AZ CLI 2.71.0 installed. I am trying to create Postgresql Flexible server through cli with the below command

az postgres flexible-server create --subscription 5f010bfb-d6f2-44fe-8571-4f4a164fe6e7 --resource-group gcms-aks-cluster-rg --name systemgenericconfig --location "Central India" --version 13 --zone 1 --password-auth enabled --admin-user genericconfigusr --admin-password genericconfigpass --tier burstable --sku-name Standard_B2s --storage-type premium_lrs --storage-size 32

This command is crashing with the below exception{0DC40706-ACE6-4A3D-B6EB-80A41F0387DB}{613799FB-AE73-4EE5-834C-D3935FCBD8B4}

I have tried to change the location, sku-name etc but no help. The same error persists. Also I could not find much help on this error anywhere in the internet. Please help me to fix this as I am supposed to create my database as soon as possible.

Regards,

Manohar Amkem

Azure Database for PostgreSQL
{count} votes

1 answer

Sort by: Most helpful
  1. Manasa Akula 250 Reputation points Microsoft External Staff
    2025-04-10T01:35:04.1066667+00:00

    Hi Manohar Amkem,

    I’d be happy to assist you in getting this resolved! Since the creation is failing with an error, it could be related to a variety of factors like CLI compatibility, parameter issues, or region-specific constraints. Without seeing the exact error message yet, I’ll suggest a few steps that should help troubleshoot and fix the issue.

    For this here Editis a clearer explanation:

    1. Verify Your Command and CLI Version Ensure you’re using the latest Azure CLI version, as older versions sometimes have bugs with Flexible Server commands. Run az --version to check—version 2.71.0 is current as of April 2025. If it’s outdated, update it with:
    az upgrade
    
    

    Then, retry your creation command. For example, a basic command might look like:

     az postgres flexible-server create --resource-group <your-rg> --name <server-name> --location <region> --admin-user <username> --admin-password <password>
    
    
    1. Check Region and SKU Availability
    az postgres flexible-server create --resource-group <your-rg> --name <server-name> --location <region> --admin-user <username> --admin-password <password>
    

    If your command includes a specific tier or SKU (e.g., Standard_B2s), confirm it’s supported in your chosen region. Use:

       az postgres flexible-server list-skus --location <region> --output table
    
    

    If the SKU or zone isn’t available, adjust your command (e.g., remove --zone or switch to a supported SKU like Standard_D2s_v3).

    1. Enable Debug Mode for More Insight Rerun your command with the --debug flag to get detailed logs:
       az postgres flexible-server create [your-options] --debug
    
    

    This might reveal if the failure is due to authentication, network policies, or an invalid parameter. Feel free to share the output, and I’ll help pinpoint the cause.

    1. Common Fixes

    A. Authentication Errors: Double-check your --admin-user and --admin-password. The password must meet complexity requirements (8-128 characters, with uppercase, lowercase, numbers, and special characters).

    B. Network Issues: If using a VNet or private endpoint, ensure the subnet has the Microsoft.Sql service endpoint enabled.

    C. Subscription or Permissions: Confirm your subscription is active and you have Contributor or Owner rights on the resource group (az role assignment list --assignee <your-email>).

    1. Workaround with Minimal Command If the issue persists, try a stripped-down command to isolate the problem:
     az postgres flexible-server create --resource-group <your-rg> --name <server-name> --location <region> --admin-user <username> --admin-password <password>
    

    Once it succeeds, you can update settings like tier or storage with:

       az postgres flexible-server update --resource-group <your-rg> --name <server-name> --tier <tier> --sku-name <sku>
    
    

    I Hope this helps. Do let us know if you any further queries.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    0 comments No comments

Your answer

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