Skip to content

Commit 41250b4

Browse files
az cosmosdb list-connection-strings usage change (microsoft#78)
Relevant to the issue I put up on github: Azure/azure-cli#8006, updating the execution in the script to match [documentation](https://docs.microsoft.com/en-us/cli/azure/cosmosdb?view=azure-cli-latest#az-cosmosdb-list-connection-strings)
1 parent d8a48b1 commit 41250b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

data/load_env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ if [[ -z "$dbName" ]]; then
196196
fi
197197

198198
# At this time, list-connection-strings does not support '-o tsv', so this command uses sed to extract the connection string from json results
199-
connString="$(az cosmosdb list-connection-strings --ids $dbName -g $resourceGroupName | sed -n -e '4 p' | sed -E -e 's/.*mongo(.*)true.*/mongo\1true/')"
199+
connString="$(az cosmosdb list-connection-strings --name $dbName -g $resourceGroupName | sed -n -e '4 p' | sed -E -e 's/.*mongo(.*)true.*/mongo\1true/')"
200200
# But list-keys does support `-o tsv`
201201
dbPassword="$(az cosmosdb list-keys --resource-group $resourceGroupName --name $dbName -o tsv | sed -e 's/\s.*$//')"
202202

0 commit comments

Comments
 (0)