I'm trying to create a postgresql database on azure with azure-cli. I set my default location with az configure --defaults location=WestEurope
, then I created a resourcegroup, a vnet and a subnet. Now I want to create a flexible server for postgresql with
az postgres flexible-server create --name $SERVERNAME --vnet $VNET --subnet $DBSUBNET
--admin-user $DB_USER --admin-password $DB_PASSWORD --sku-name Standard_B1ms --tier Burstable --storage-size 1024 --tags "Billing=test" --version 13 --database-name $DB_NAME
but I get this error and the server is not created: The location of Vnet should be same as the location of the server.
My Vnet is obviously located in WestEurope, given my default location set before, and I can't understand how the location of any resource I create could be different from my default location. I even tried to add --location WestEurope
to the command, but it produced the same result.