-
Notifications
You must be signed in to change notification settings - Fork 695
Closed
Copy link
Labels
area-integrationsIssues pertaining to Aspire Integrations packagesIssues pertaining to Aspire Integrations packagesazureIssues associated specifically with scenarios tied to using AzureIssues associated specifically with scenarios tied to using AzuresqlserverIssues related to SQLServer integrtionsIssues related to SQLServer integrtions‼️regression-from-last-releaseThis used to work in an earlier version of Aspire and we broke it!This used to work in an earlier version of Aspire and we broke it!
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
In some cases when using AddAzureSqlServer together with RunAsContainer it tries to provision the sql-roles even so it should only run locally.

Expected Behavior
No "sql-roles" should be published when running locally with "RunAsContainer"
Steps To Reproduce
- Create starter app template
- Add the Azure Sql nuget packet
- Add this to the AppHost builder:
builder.AddBicepTemplateString("test", "");
var sqlServer = builder
.AddAzureSqlServer("sql")
.RunAsContainer();
var identityDb = sqlServer.AddDatabase("identityDb");
- Add a "WithReference(identityDb)" to any of the projects.
Starting the project like this tries to publish sql roles.
This problem disappears if "AddBicepTemplate" or "AddBicepTemplateString" is removed or the reference to the database is removed.
Exceptions (if any)
No response
.NET Version info
.NET SDK:
Version: 9.0.300
Commit: 15606fe0a8
Workload version: 9.0.300-manifests.af4147de
MSBuild version: 17.14.5+edd3bbf37
Anything else?
.NET Aspire version 9.3.0
VS 2022
Metadata
Metadata
Assignees
Labels
area-integrationsIssues pertaining to Aspire Integrations packagesIssues pertaining to Aspire Integrations packagesazureIssues associated specifically with scenarios tied to using AzureIssues associated specifically with scenarios tied to using AzuresqlserverIssues related to SQLServer integrtionsIssues related to SQLServer integrtions‼️regression-from-last-releaseThis used to work in an earlier version of Aspire and we broke it!This used to work in an earlier version of Aspire and we broke it!