Home > Software engineering >  Unable to create PostgreSQL server with Azure CLI
Unable to create PostgreSQL server with Azure CLI

Time:10-12

I am trying to create a PosgreSQL server with the following command

az postgres server create --resource-group MyResourceGroup --name testdbxxxyyyzzz_743569812 --location westeurope --admin-user postgres --admin-password postgres --sku-name B_Gen5_1

And I see this message

Checking the existence of the resource group 'MyResourceGroup'...
Resource group 'MyResourceGroup' exists ? : True 
The server name 'testdbxxxyyyzzz_743569812' already exists.Please re-run command with some other server name.

It happens for any name I'm trying to use. What I'm doing wrong or at least help me to investigate this issue any further? Is there any verbose mode for Azure CLI?

CodePudding user response:

Solved: the server name can contain only lowercase letters, numbers, and the hyphen (-) character, after changing the name to "testdbxxxyyyzzz743569812" everything works fine. The message is completely misleading.

  • Related