Azure Search: Firewall bypass option not supported via Azure CLI
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
## Problem
Attempting to set the firewall bypass option (`network_rule_set.bypass`) for an Azure Cognitive Search service using the Azure CLI is not supported and results in an error. The CLI only exposes `ip_rules` in `network_rule_set`, while the Azure REST API and ARM templates support a `bypass` property. This creates inconsistency and limits automation via CLI.
## Steps to Reproduce
1. Run the following command:
```sh
az search service update \
--name \
--resource-group \
--set network_rule_set.bypass="AzureServices"
```
2. Observe the error: `Couldn't find 'bypass' in 'network_rule_set'. Available options: ['ip_rules']`
## Expected Behavior
It should be possible to set the `bypass` property using the Azure CLI in line with the Azure REST API and ARM template schema.
## Actual Behavior
The CLI does not support the `bypass` property and raises an error.
## Impact
- Automation scripts using the CLI cannot enable/disable firewall bypass for Azure Cognitive Search.
- Users must use ARM templates or direct REST API calls, which are less convenient for scripting and operational consistency.
## References
- [Azure REST API networkRuleSet docs](https://learn.microsoft.com/en-us/rest/api/searchservice/update-service?tabs=HTTP)
- [CLI error message reference]
## Suggested Solution
Enhance the Azure CLI to support the `bypass` property in `network_rule_set` for Azure Cognitive Search services.
Contributor guide
Assessment
This issue has not been assessed yet.