Skip to content

fix(infra): remove enableAnalyticalStorage on Cosmos DB account creation#432

Merged
Roopan-Microsoft merged 1 commit into
devfrom
psl-sw/fix-cosmos-analytical-storage
May 14, 2026
Merged

fix(infra): remove enableAnalyticalStorage on Cosmos DB account creation#432
Roopan-Microsoft merged 1 commit into
devfrom
psl-sw/fix-cosmos-analytical-storage

Conversation

@Shreyas-Microsoft
Copy link
Copy Markdown
Collaborator

@Shreyas-Microsoft Shreyas-Microsoft commented May 13, 2026

Purpose

This pull request makes minor adjustments to the infrastructure code, primarily in the infra/main.json and infra/modules/cosmosDb.bicep files. The main changes involve updating dependency ordering and removing the enableAnalyticalStorage parameter from Cosmos DB account creation. These updates help ensure correct resource provisioning and simplify the Cosmos DB configuration.

Infrastructure dependency and configuration updates:

  • Adjusted the order of dependencies for private DNS zones in two resource definitions in infra/main.json to ensure correct resource deployment sequencing. [1] [2]
  • Removed the enableAnalyticalStorage parameter from Cosmos DB account creation in both infra/main.json and infra/modules/cosmosDb.bicep, simplifying the Cosmos DB configuration. [1] [2]

Template metadata updates:

  • Updated the _generator.templateHash fields in infra/main.json to reflect changes in the template. [1] [2]

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

What to Check

Verify that the following are valid

  • ...

Other Information

Azure no longer supports enabling Analytical Storage during Cosmos DB
account creation, which caused deployments to fail with:

  BadRequest: Enabling Analytical Storage during account creation
  is no longer supported.

The flag was set to true in infra/modules/cosmosDb.bicep but no
container in this solution configures analyticalStorageTtl, so the
feature was unused. Removing the explicit value lets the AVM module
default (false) apply, unblocking deployments.

Regenerated infra/main.json from the updated Bicep.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the deprecated Cosmos DB “Analytical Storage enablement at account creation time” setting from the infrastructure module to unblock fresh deployments that currently fail with BadRequest: Enabling Analytical Storage during account creation is no longer supported.

Changes:

  • Removed enableAnalyticalStorage: true from the Cosmos DB account AVM module invocation so the module default (false) applies.
  • Regenerated infra/main.json to keep the compiled ARM template in sync with the Bicep source (including deterministic dependsOn reordering and updated template hashes).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
infra/modules/cosmosDb.bicep Stops passing enableAnalyticalStorage during Cosmos DB account creation to avoid Azure rejecting the request.
infra/main.json Updates the compiled template output to reflect the Bicep change (removes the parameter and updates hashes/order).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Roopan-Microsoft Roopan-Microsoft merged commit e62acf2 into dev May 14, 2026
10 checks passed
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.9.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants