Read replica creation for Azure Database for Postgres flexible server via Azure CLI

ofranz 10 Reputation points
2023-03-23T08:29:45.0766667+00:00

When trying to replicate a server in the region West Europa the CLI responds with the following error:

Replica can only be created for multi-availability zone regions. The location of the source server is in a single availability zone region.

The command used:

az postgres flexible-server replica create  --replica-name testReplicaServer -g tt-bi --source-server sourceServer --zone westeuropa

The replica creation itself works via the Azure Portal UI for the same server.

Azure Database for PostgreSQL
{count} votes

2 answers

Sort by: Most helpful
  1. ShaktiSingh-MSFT 15,321 Reputation points
    2023-04-03T05:54:28.7533333+00:00

    Hi @ofranz ,

    Thanks for your patience and for reporting the behavior.

    I have checked with the internal team regarding the Read replica creation for Azure Database for Postgres flexible server via Azure CLI., it has been communicated that it is a known issue and would be resolved soon.

    For now, we request you to use Azure portal for replication.

    In case of further questions, please let us know.

    Many thanks for your contribution.

    Thank you.

    0 comments No comments

  2. Sahu, Ayush 0 Reputation points
    2023-10-02T07:24:59.4966667+00:00

    Hi,

    I am also facing similar issue, where I can create a replica with same name but with azure cli I am getting error as below :

    az postgres flexible-server replica create --replica-name ${EUW_POSTGRES_NAME} --resource-group ${EUW_RESOURCE_GROUP} \
      --source-server ${EUN_POSTGRES_ID} --location ${EUW_LOCATION} \
      --subnet "${EUW_SUBNET_ID}" --zone 3
    Specified server name is already used.
    
    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.