Azure / Azure/azure-cli

Azure Search: Firewall bypass option not supported via Azure CLI

Open
#31,812 2 comments 0 reactions 0 assignees View on GitHub
act-codegen-extensibility-squad customer-reported Search Service Attention
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.