首页 > 解决方案 > Unable to create PostgreSQL server with Azure CLI

问题描述

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?

标签: azure

解决方案


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.


推荐阅读