Skip to content

Quick fix for UseEmulator() breaking with AddDatabase(). - #1702

Merged
David Fowler (davidfowl) merged 1 commit into
mainfrom
cosmos-use-emulator-with-database-quick-fix
Jan 19, 2024
Merged

David Fowler (davidfowl) merged 1 commit into
mainfrom
cosmos-use-emulator-with-database-quick-fix

Conversation

@mitchdenny

@mitchdenny Mitch Denny (mitchdenny) commented Jan 18, 2024 •

Copy link
Copy Markdown
Member

The following code throws:

var db = builder.AddAzureCosmosDB("cosmos").UseEmulator().AddDatabase("db");
builder.AddProject<Projects.MyApp>("myapp").WithReference(db);

This PR fixes that issue. Its a side effect of the way that the AzureCosmosDBDatabaseResource interacts with the Azure Provisioner. This is a quick fix that will work until we remove the Azure Provisioner.

Microsoft Reviewers: Open in CodeFlow

@ghost ghost added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Jan 18, 2024
@davidfowl
David Fowler (davidfowl) deleted the cosmos-use-emulator-with-database-quick-fix branch January 19, 2024 02:16
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants