You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Aspire.Hosting.Azure.Sql/README.md
+32-1Lines changed: 32 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Aspire.Hosting.Azure.Sql library
2
2
3
-
Provides extension methods and resource definitions for a .NET Aspire AppHost to configure Azure SQL Server.
3
+
Provides extension methods and resource definitions for a .NET Aspire AppHost to configure Azure SQL DB.
4
4
5
5
## Getting started
6
6
@@ -54,6 +54,37 @@ The `WithReference` method configures a connection in the `MyService` project na
54
54
builder.AddSqlServerClient("sqldata");
55
55
```
56
56
57
+
## Azure SQL DB defaults
58
+
59
+
Unless otherwise specified, the Azure SQL DB created will be a 2vCores General Purpose Serverless database (GP_S_Gen5_2) with the free offer enabled.
60
+
61
+
Read more about the free offer here: [Deploy Azure SQL Database for free](https://learn.microsoft.com/azure/azure-sql/database/free-offer?view=azuresql)
62
+
63
+
The free offer is configured so that when the maximum usage limit is reached, the database is stopped to avoid incurring in unexpected costs.
64
+
65
+
If you **don't want to use the free offer** and instead deploy the database use the default sku set by Azure, use the `WithAzureDefaultSku` method:
66
+
67
+
```csharp
68
+
varsql=builder.AddAzureSqlServer("sql")
69
+
.AddDatabase("db", "my-db-name")
70
+
.WithAzureDefaultSku();
71
+
```
72
+
73
+
## Setting a specific SKU
74
+
75
+
If you want to manually define what SKU must be used when deploying the Azure SQL DB resource, use the `ConfigureInfrastructure` method:
0 commit comments