Unable to Add Network Rule to CosmosDb
See original GitHub issueThis is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az cosmosdb network-rule add
Errors:
'NoneType' object has no attribute 'virtual_network_rules'
Traceback (most recent call last):
python3.8/site-packages/knack/cli.py, ln 215, in invoke
cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 654, in execute
raise ex
cli/core/commands/__init__.py, ln 718, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
cli/core/commands/__init__.py, ln 711, in _run_job
six.reraise(*sys.exc_info())
...
cli/core/commands/__init__.py, ln 325, in __call__
return self.handler(*args, **kwargs)
azure/cli/core/__init__.py, ln 545, in default_command_handler
return op(**command_args)
cli/command_modules/cosmosdb/custom.py, ln 955, in cli_cosmosdb_network_rule_add
for rule in existing.virtual_network_rules:
AttributeError: 'NoneType' object has no attribute 'virtual_network_rules'
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az cosmosdb network-rule add --name {} --subnet {} -g {}
Expected Behavior
Network rule for the vnet added successfully
Environment Summary
macOS-10.15.4-x86_64-i386-64bit
Python 3.8.3
Installer: HOMEBREW
azure-cli 2.7.0
Extensions:
image-copy-extension 0.2.1
Additional Context
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Configure IP firewall in Azure Cosmos DB - Microsoft Learn
To set the IP access control policy in the Azure portal, go to the Azure Cosmos DB account page and select Firewall and...
Read more >When start Azure cosmos db emulator It is show Unable to ...
First it is shows 8081 already running. I changed the port issue resolved. But it showing Unable to add firewall rule settings. Please...
Read more >Restrict Default Network Access for Azure Cosmos DB Accounts
Ensure that your Microsoft Azure Cosmos DB accounts are configured to deny access to traffic from all networks, including the public Internet.
Read more >Azure Cosmos DB accounts should have firewall rules
How to create a network security group with security rules: https://docs.microsoft.com/azure/virtual-network/tutorial-filter-network-traffic How to deploy ...
Read more >Securely connecting to Azure Cosmos DB using ... - YouTube
00:13:52 - A Virtual Machine in the same Virtual Network 00:17:08 ... configuration 00:37:07 - Adding the security features developers need ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We have updated the swagger so that the SDK will provide an error message when the account does not exist. This change will be in the next SDK release and then can be applied to the CLI. Target is middle of August release.
As a part of S175(https://github.com/Azure/azure-powershell/milestone/109), a CosmosDB was updated. @sireza please verify if your issue is resolved now.