Skip to content

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

@davidfowl

Description

@davidfowl

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");

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-integrationsIssues pertaining to Aspire Integrations packagesazureIssues associated specifically with scenarios tied to using AzuremysqlIssues related to MySQL integrations

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions