azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

az cosmosdb create --locations make not specified region but resource manager's resion.

Open YuKogasaka opened this issue 5 years ago • 3 comments

Describe the bug When I create a CosmosDB account for a specified region using az cosmosdb create --locations command, "location" is not specified region, but resources group's region. For example, if deploy the cosmosDB account location as "West US" region within a resource group's region "Japan East", "location" make "Japan East".

20210618_001

This symptom does not affect Cosmos DB account, but it does not occur when deployed in Azure portal or Azure PowerShell (New-AzCosmosDBAccount).

To Reproduce Occurs when deploy the CosmosDB account by running the following command :

  az cosmosdb create --name 'CosmosDBAccountName' \
    --resource-group 'ResourceGroupName' \
    --locations regionName='RegionName'

Expected behavior I want it to be a "location" with a specified region, similar to the Azure portal and Azure PowerShell.

Environment summary

  • Install Method MSI

  • CLI version PS C:> az --version azure-cli 2.25.0

    core 2.25.0 telemetry 1.0.6

  • OS version Windows 10 Pro (x64) version 21H1 (OS Build 19043.1052)

  • Shell Type Azure CloudShell, cmd.exe

YuKogasaka avatar Jun 18 '21 02:06 YuKogasaka

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Wmengmsft, @MehaKaushik, @shurd, @anfeldma-ms.

Issue Details

Describe the bug When I create a CosmosDB account for a specified region using az cosmosdb create --locations command, "location" is not specified region, but resources group's region. For example, if deploy the cosmosDB account location as "West US" region within a resource group's region "Japan East", "location" make "Japan East".

20210618_001

This symptom does not affect Cosmos DB account, but it does not occur when deployed in Azure portal or Azure PowerShell (New-AzCosmosDBAccount).

To Reproduce Occurs when deploy the CosmosDB account by running the following command :

  az cosmosdb create --name 'CosmosDBAccountName' \
    --resource-group 'ResourceGroupName' \
    --locations regionName='RegionName'

Expected behavior I want it to be a "location" with a specified region, similar to the Azure portal and Azure PowerShell.

Environment summary

  • Install Method MSI

  • CLI version PS C:> az --version azure-cli 2.25.0

    core 2.25.0 telemetry 1.0.6

  • OS version Windows 10 Pro (x64) version 21H1 (OS Build 19043.1052)

  • Shell Type Azure CloudShell, cmd.exe

Author: kogesaka
Assignees: -
Labels:

Cosmos, Service Attention

Milestone: -

ghost avatar Jun 18 '21 02:06 ghost

route to service team

yonzhan avatar Jun 18 '21 02:06 yonzhan

We are aware of this, CLI is coded in a way that location will be resource group's location when account is created using CLI. We plan to remove this going forward. I will update here once removed. Till then, I request you to use Azure Powershell or Portal as a workaround.

MehaKaushik avatar Jul 06 '21 18:07 MehaKaushik