dotnet / aspire

Tools, templates, and packages to accelerate building observable, production-ready apps
https://learn.microsoft.com/dotnet/aspire
MIT License
3.88k stars 467 forks source link

Support Azure MySQL as a deployment option for mysql in Aspire.Hosting.Azure #2130

Open davidfowl opened 9 months ago

davidfowl commented 9 months ago

https://learn.microsoft.com/en-us/azure/mysql/quickstart-create-mysql-server-database-using-bicep

AsAzureMySql

AsAzureMySql will treat this resource like an Azure resource when run locally and in when published to the manifest. 

var builder = DistributedApplication.CreateBuilder();
var db = builder.AddMySql("mysql")
                .AsAzureMySql()
                .AddDatabase("db");

PublishAsAzureMySql

PublishAsAzureMySql will only affect the manifest but will run as a container image locally.

var builder = DistributedApplication.CreateBuilder();
var db = builder.AddMySql("mysql")
                .PublishAsAzureMySql()
                .AddDatabase("db");
davidfowl commented 8 months ago

Moving this to preview5

joperezr commented 8 months ago

@davidfowl will you be taking care of this, or will it be @mitchdenny ?

davidfowl commented 8 months ago

One of us.

joperezr commented 8 months ago

Assigning to @mitchdenny but CDK work takes priority.