Skip to content

Aspire 9.2.1: Cosmos DB Preview Emulator not creating databases and containers #9326

@soundaranbu

Description

@soundaranbu

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Hi, I've tried the Aspire 9.2.1 with Cosmos DB hosting integration with the preview emulator. But the following code does not create databases and containers when we check in the data explorer. I'm wondering if it's a bug or this is not supported yet

var builder = DistributedApplication.CreateBuilder(args);

var cosmos = builder.AddAzureCosmosDB("cosmos-db")
                    .RunAsPreviewEmulator(emulator =>
                     {
                         emulator.WithDataExplorer();
                     });

var customers = cosmos.AddCosmosDatabase("customers");
var profiles = customers.AddContainer("profiles", "/id");

var orders = cosmos.AddCosmosDatabase("orders");
var details = orders.AddContainer("details", "/id");
var history = orders.AddContainer("history", "/id");

builder.Build().Run();

Dashboard:

Image

Data Explorer:

Image

Expected Behavior

Should create the cosmos database and containers when using the preview emulator

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version info

9.0.203

Anything else?

No response

Metadata

Metadata

Assignees

Labels

area-integrationsIssues pertaining to Aspire Integrations packagesazure-cosmosdbIssues related to Azure CosmosDB

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions