Skip to content

Cosmos DB --network-acl-bypass-resource-ids need to be validated further #24156

@chshihMSFT

Description

@chshihMSFT

Related 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

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botCXP AttentionThis issue is handled by CXP team.CosmosDBaz cosmosdbbugThis issue requires a change to an existing behavior in the product in order to be resolved.needs-author-feedbackMore information is needed from author to address the issue.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions