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

Update-AzCosmosDBAccountRegion fails with "List of supplied locations is invalid" when passing String[]

Open plzm opened this issue 6 years ago • 8 comments

When attempting to update an account from one region (e.g. East US) to two regions (e.g. East US, West US) using string array parameter set, getting "List of supplied locations is invalid error".

plzm avatar Apr 13 '20 12:04 plzm

Update-AzCosmosDBAccountRegion

plzm avatar Apr 13 '20 12:04 plzm

Note that Update-AzCosmosDBAccountRegion succeeds as expected if PSLocationObject[] is passed instead of the array of string location names.

plzm avatar Apr 13 '20 13:04 plzm

This should have been resolved in Az.CosmosDB 0.1.4 https://www.powershellgallery.com/packages/Az.CosmosDB/0.1.4

MehaKaushik avatar Apr 21 '20 20:04 MehaKaushik

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @kushagraThapar, @srinathnarayanan, @southpolesteve, @shurd, @ealsur, @j82w, @anfeldma-ms.

ghost avatar Apr 22 '20 09:04 ghost

@MehaKaushik, could you please confirm that this is indeed fixed in 0.1.4 as I am asking as I am still seeing the error. Thanks!

lszomoru avatar Jul 20 '20 14:07 lszomoru

@lszomoru please note that you need to provide your existing locations in the same order as failover priorities and then the new location you want to add. Can you please share the exact command you used and the output ? Would be helpful, if you dont mind sharing the how the Locations object look like from the result of your Get-AzCosmosDBAccount cmdlet.

MehaKaushik avatar Jul 21 '20 22:07 MehaKaushik

Can you also check the version of Az.CosmosDB, since the module is not GA'ed it is not updated with the Az module, need to update it separately.

MehaKaushik avatar Jul 21 '20 22:07 MehaKaushik

@MehaKaushik, I have tracked down the issue to an incorrect order of the existing locations. Thanks for your help!

lszomoru avatar Aug 04 '20 15:08 lszomoru