Skip to main content
rightsizing · azure

Azure Cosmos DB Dev/Test with Multi-Region Replication

resource types
1
rule IDs covered
1
severity
medium

What does ZopNight detect here?

Non-production Cosmos DB accounts with geo-replication enabled are flagged for collapsing to a single region. Savings are computed as cost × (N−1)/N from the discovered regionCount when it is at least 2; the rule abstains when regionCount is missing or the account lacks a positive dev/test signal.

Signal and threshold

How ZopNight evaluates Azure Cosmos DB Dev/Test with Multi-Region Replication.
Field Value
Rule IDsRC-1337
Categoryrightsizing
Severitymedium
Metricnone — pure configuration read
Sourcecosmos_multiregion.go

The geo-replication flag and the non-prod proof

  • metadata: geo_replication_enabled=true (the Azure discoverer derives this from the account’s locations[]/failoverPolicies[] arrays at resource_graph.go:3275 and emits “true” for multi-region/geo-replicated accounts). The prior tag: multi_region=true read was never produced; the producer emits the equivalent signal under geo_replication_enabled in Metadata.
  • metadata: regionCount (number of configured locations) is required to price; when present and ≥2, it drives savings = cost × (N−1)/N. There is a producer gap: the discoverer’s failoverPolicies fallback path sets geo_replication_enabled=“true” without stamping regionCount, so on that path the rule abstains (returns nil) rather than fabricate. The prior conservative 0.50 fallback fraction was removed (concrete-or-abstain, 2026-06-27).
  • positive non-prod signal, evaluated by the rule-local cosmosNonProdReason (same gating/priority as isNonProdResource: env tag / name / resource group, prod env tag is an absolute veto): abstains unless the account is positively non-prod (audit 2026-06-26 pattern A: skipping only prod-named accounts wrongly treated every neutral name as non-prod).
  • pricing required (SetPricing); abstains when cost ≤ 0.

Why collapsing N regions drops (N-1)/N of cost

A real topology delta: cost × (regionCount−1)/regionCount when regionCount (≥2) is in Metadata (collapsing N replicated regions to one drops (N−1)/N of the linearly-scaled replicated RU cost; fraction in (0,1), so savings < cost). The rule abstains (returns nil) when regionCount is absent (the producer gap on the failoverPolicies fallback path), with no fabricated fraction (concrete-or-abstain, 2026-06-27).

Collapsing a dev/test account to one region

  1. Verify this is a non-production Cosmos DB account

See it fire on your bill.

Connect an account read-only. The first findings land in minutes.

417 rule families across 353 resource types on 22 platforms. Every threshold, metric, and IAM action is documented on these pages before you grant anything.

417 rule families documented
353 resource types covered
read-only default access level
Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console· Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console·