|  | 
|  | 1 | +--- | 
|  | 2 | +title: "Breaking change - Change the default SKU used for creating a new Azure SQL database" | 
|  | 3 | +description: "Learn about the breaking change in .NET Aspire 9.3 where the default SKU for Azure SQL database deployment now uses the free offer." | 
|  | 4 | +ms.date: 5/7/2025 | 
|  | 5 | +ai-usage: ai-assisted | 
|  | 6 | +ms.custom: https://github.com/dotnet/docs-aspire/issues/3144 | 
|  | 7 | +--- | 
|  | 8 | + | 
|  | 9 | +# Change the default SKU used for creating a new Azure SQL database | 
|  | 10 | + | 
|  | 11 | +The default SKU for deploying a new Azure SQL database has been updated to take advantage of the Azure SQL Database free offer. This change helps avoid unexpected monthly costs by pausing the database when free offer limits are reached. A new method, `WithSku`, has also been introduced to allow customization of the SKU during deployment. | 
|  | 12 | + | 
|  | 13 | +## Version introduced | 
|  | 14 | + | 
|  | 15 | +.NET Aspire 9.3 | 
|  | 16 | + | 
|  | 17 | +## Previous behavior | 
|  | 18 | + | 
|  | 19 | +The Azure SQL database was deployed with a default SKU that did not utilize the Azure SQL Database free offer. This could result in unexpected monthly costs if the database usage exceeded the free tier limits. | 
|  | 20 | + | 
|  | 21 | +## New behavior | 
|  | 22 | + | 
|  | 23 | +The Azure SQL database now deploys with the default SKU `GP_S_Gen5_2` (General Purpose Serverless) and the Azure SQL Database free offer enabled. The database pauses automatically when free offer limits are reached, preventing unexpected costs. Additionally, the `WithSku` method allows you to specify a different SKU if needed. | 
|  | 24 | + | 
|  | 25 | +Example usage of the new `WithSku` method: | 
|  | 26 | + | 
|  | 27 | +```csharp | 
|  | 28 | +var database = resourceBuilder | 
|  | 29 | +    .AddDatabase("MyDatabase") | 
|  | 30 | +    .WithSku("GP_S_Gen5_4"); | 
|  | 31 | +``` | 
|  | 32 | + | 
|  | 33 | +## Type of breaking change | 
|  | 34 | + | 
|  | 35 | +This is a [behavioral change](../../categories.md#behavioral-change). | 
|  | 36 | + | 
|  | 37 | +## Reason for change | 
|  | 38 | + | 
|  | 39 | +This change ensures that deployments take advantage of the Azure SQL Database free offer, reducing the risk of incurring unexpected monthly costs. For more details, see the [Azure SQL Database free offer documentation](https://learn.microsoft.com/azure/azure-sql/database/free-offer?view=azuresql). | 
|  | 40 | + | 
|  | 41 | +## Recommended action | 
|  | 42 | + | 
|  | 43 | +If you want to use a different SKU for your Azure SQL database deployment, use the new `WithSku` method to specify the desired SKU. For example: | 
|  | 44 | + | 
|  | 45 | +```csharp | 
|  | 46 | +var database = resourceBuilder | 
|  | 47 | +    .AddDatabase("MyDatabase") | 
|  | 48 | +    .WithSku("GP_S_Gen5_4"); | 
|  | 49 | +``` | 
|  | 50 | + | 
|  | 51 | +Review your existing deployments to ensure they align with the new default behavior. | 
|  | 52 | + | 
|  | 53 | +## Affected APIs | 
|  | 54 | + | 
|  | 55 | +- <xref:Aspire.Hosting.Azure.AzureSqlDatabaseResource>: Updated to use the free offer as the default deployment option. | 
|  | 56 | +- <xref:Aspire.Hosting.AzureSqlExtensions.AddDatabase*>: Updated to use the free offer as the default deployment option. | 
|  | 57 | +- `public static IResourceBuilder<AzureSqlDatabaseResource> WithSku`: Added to allow specifying the desired SKU. | 
0 commit comments