Azure / Azure/azure-rest-api-specs

[BUG]Microsoft.DocumentDB/databaseAccounts - Deletes existing config when no property is passed for ipRules

Open
#39,107 0 comments 0 reactions 0 assignees View on GitHub
bug Cosmos customer-reported question Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
3d 37m
Merged PRs (30d)
446

Description

### API Spec link

https://learn.microsoft.com/en-us/azure/templates/microsoft.documentdb/databaseaccounts?pivots=deployment-language-bicep

### API Spec version

2025-11-01-preview

### Describe the bug

Not sure where to submit this so hope this is the right place. When we use Bicep to create a Cosmos Database account we do not setup up ipRules. We a have a separate process which does this after a deployment. We do understand we could set the ipRules via bicep but it works out for us better the other way. However when we re-deploy the account with our ipRules se the re-deploy removes all of our ipRules even when we do not pass a property value for ipRules. This seems odd to us as Bicep is supposed to be idempotent.

### Expected behavior

In our a case a re-deploy should not remove our ipRules if no value is passed.

### Actual behavior

See above

### Reproduction Steps

1. Create a cosmos account
2. Set the ipRules (add a public ip for example)
3. Redeploy
4. ipRules are gone.

### Environment

Latest version of bicep

Contributor guide

Open the contributing guide

Research direction

Start with the linked Microsoft.DocumentDB databaseAccounts API specification, focusing on the 2025-11-01-preview ipRules property and its update semantics. Reproduce the four-step sequence with Bicep and an externally set public IP; done means determining whether the specification or service behavior accounts for the rules being removed when ipRules is omitted, and documenting the relevant finding.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
api, cloud, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.