docs-aspire icon indicating copy to clipboard operation
docs-aspire copied to clipboard

Make Azure Postgres Flexible Server specific deployment article.

Open mitchdenny opened this issue 1 year ago • 2 comments
trafficstars

At the end of this article:

https://learn.microsoft.com/en-us/dotnet/aspire/database/postgresql-component?tabs=dotnet-cli

We should link on to a new article which describes how to deploy a .NET Aspire application with a Postgres database resource to Azure. We have a new API for this that generates Bicep that is used by AZD.

builder.AddPostgres("pgsql").PublishAsAzurePostgresFlexibleServer().AddDatabase(db);

Associated WorkItem - 238748

mitchdenny avatar Feb 25 '24 22:02 mitchdenny

Hey @mitchdenny - is that code accurate?

I noticed that the db parameter in the AddDatabase call isn't a string, I'm assuming that's a typo.

Should that instead be:

builder.AddPostgres("pgsql")
       .PublishAsAzurePostgresFlexibleServer()
-      .AddDatabase(db);
+      .AddDatabase("db");

IEvangelist avatar Mar 13 '24 11:03 IEvangelist

Yeah its a typo. Thanks!

mitchdenny avatar Mar 24 '24 22:03 mitchdenny