-
Notifications
You must be signed in to change notification settings - Fork 693
Open
Labels
area-integrationsIssues pertaining to Aspire Integrations packagesIssues pertaining to Aspire Integrations packagesazure-sqlserverbreaking-changeIssue or PR that represents a breaking API or functional change over a prerelease.Issue or PR that represents a breaking API or functional change over a prerelease.
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
It would be good if possible to add defaults for AddAzureSqlServer that set the SKU to the minimum available version if nothing is specified.
The reason for this is that not specifying it leads to azure auto creating the database at a general purpose vcore 2 with an estimated monthly cost of ~400
Describe the solution you'd like
var sql = builder.AddAzureSqlServer("sqlserver").RunAsContainer(
container => container.WithLifetime(ContainerLifetime.Persistent)
).ConfigureInfrastructure(c =>
{
if (c.GetProvisionableResources().OfType<SqlDatabase>().SingleOrDefault() is SqlDatabase db)
{
db.Sku = new SqlSku
{
Name = "Basic",
Tier = "Basic",
Capacity = 5
};
}
}).AddDatabase("sqldb", "DatabaseName");
Additional context
Happy to complete this work
Metadata
Metadata
Assignees
Labels
area-integrationsIssues pertaining to Aspire Integrations packagesIssues pertaining to Aspire Integrations packagesazure-sqlserverbreaking-changeIssue or PR that represents a breaking API or functional change over a prerelease.Issue or PR that represents a breaking API or functional change over a prerelease.