Azure / azure-sdk-for-js

This repository is for active development of the Azure SDK for JavaScript (NodeJS & Browser). For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/javascript/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-js.
MIT License
2.09k stars 1.21k forks source link

Azure App Configuration Readme Issue #26034

Open zzhxiaofeng opened 1 year ago

zzhxiaofeng commented 1 year ago

1. Section link GetImage (8) Reason: image

@joheredi, @jsquire, @dw511214992 for notification.

HarshaNalluru commented 1 year ago

I've tried the command, doesn't seem to work.. I hit.. "Failed to find the App Configuration store '\<resource-name>'." error.

zzhxiaofeng commented 1 year ago

@HarshaNalluru I have tried the command with the latest version (2.49.0) of az cli and it runs successfully. Are you currently using the latest version? If not, please update to latest and try again.

HarshaNalluru commented 1 year ago

Oh, realized the problem, a different subscription was set. Also, upgraded to 2.49.0, though unrelated to the problem.

Both commands are working fine for me.

PS /workspaces/azure-sdk-for-js> az appconfig credential list -g resource-group -n account-name --query "([?name=='Primary'].connectionString)[0]"      
"Endpoint=https://account-name.azconfig.io;Id=<redacted>;Secret=<redacted>"

PS /workspaces/azure-sdk-for-js> az appconfig credential list -g resource-group -n account-name --query "[?name=='Primary'].connectionString"
[
  "Endpoint=https://account-name.azconfig.io;Id=<redacted>;Secret=<redacted>"
]

The difference being array or not..

zzhxiaofeng commented 1 year ago

@HarshaNalluru Do you run this command in local on windows system? If not, you can try this command in local on windows. We run this command by this way and the error still exists.

HarshaNalluru commented 1 year ago

My above response is from linux, will check windows...

Okay, tested it on Windows, and it fails.

PS C:\path> az appconfig credential list -g <resource-group> -n <account-name> --query "[?name=='Primary'].connectionString"
[
  "Endpoint=https://<account-name>.azconfig.io;Id=Bl85;Secret=<redacted>"
]

PS C:\path> az appconfig credential list -g <resource-group> -n <account-name> --query "([?name=='Primary'].connectionString)[0]"
[0] was unexpected at this time.
C:\path>  "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\\..\python.exe" -IBm azure.cli appconfig credential list -g <resource-group> -n <account-name> --query ([?name=='Primary'].connectionString)[0]

PS C:\path>

Sounds like a bug in az cli it seems.

HarshaNalluru commented 1 year ago

Logged an issue at https://github.com/Azure/azure-cli/issues/26583