Cosmos DB --network-acl-bypass-resource-ids need to be validated further
See original GitHub issueRelated command az cosmosdb update --name MyCosmosDBDatabaseAccount–resource-group MyResourceGroup–network-acl-bypass AzureServices --network-acl-bypass-resource-ids “/subscriptions/subId/resourceGroups/rgName/providers/Microsoft.Synapse/workspaces/wsName”
Describe the bug It’s possible to input resource id without leading ‘/’ in URI, and this cause Cosmos DB Analytical Store to be unable to identify the mentioned resources and by-pass on network acl checking. Without the leading ‘/’ in resource URI, CLI execution won’t report any errors or indicate it’s actually an invalid format. Cosmos DB can still store the invalid URI at last, but no help to allow querying from Synapse.
To Reproduce az cosmosdb update --name MyCosmosDBDatabaseAccount–resource-group MyResourceGroup–network-acl-bypass AzureServices --network-acl-bypass-resource-ids “subscriptions/subId/resourceGroups/rgName/providers/Microsoft.Synapse/workspaces/wsName”
Expected behavior Please validate the input values of --network-acl-bypass-resource-ids, to ensure customer configuring their resource correctly.
Environment Summary
Linux-5.4.0-1091-azure-x86_64-with-glibc2.35 (Cloud Shell), CBL-Mariner/Linux
Python 3.9.13
Installer: RPM
azure-cli 2.40.0
Extensions:
kusto 0.4.0
cosmosdb-preview 0.17.0
ai-examples 0.2.5
ml 2.7.1
ssh 1.1.2
Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1
Additional Context
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
@chshihMSFT The PR was merged a while ago. The fix is part of this milestone Targeted for 2022-11-01 and not yet released. https://github.com/Azure/azure-cli/milestone/123 .
Thanks! Looking forward to it.