-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility of SqlDatabaseProjects with Aspire.Hosting.Azure.Sql #434
Comments
I have just added the ability to use a connection string - but not sure what the purpose of AddAzureSqlServer is. The SQL projects extension is local only, not for deployment manifest. |
I think it will work because of the added connection string support, as a AzureSqlServerResource implements IResourceWithConnectionString |
I think that adding that package breaks even if you do a local container by doing: builder.AddAzureSqlServer("sql").RunAsContainer(); I noticed something last week but I had to pivot off Azure to unblock and I haven't gotten back to investigating if it was the integration or my code. |
What breaks? |
the dbproject didn't get deployed |
I assume because the extension extends only SqlServerResource and not AzureSqlServerResource? |
Doesn't |
@jmezach No, I think SqlServerResource is very much a container resource: https://learn.microsoft.com/en-us/dotnet/api/aspire.hosting.azure.azuresqlserverresource?view=dotnet-aspire-8.0 |
We haven't attempted to make this more abstract as yet. |
@davidfowl @jmezach Guess we could just add more extension methods that accepts a AzureSqlServerResource and constrain on that in addition to SqlServerResource? If the ability to publish a .dacpac to an Azure SQL DB adds value? (I think it does) |
We have noticed this issue has not been updated within 21 days. If there is no action on this issue in the next 14 days, we will automatically close it. You can use |
@davidfowl @jmezach I'm happy to take a look at implementing @ErikEJ suggestion of adding extension methods if it's agreed that that is the solution to move forward with |
@dgee2 Feel free to create a PR, we now have another "customer report" |
Related to an existing integration?
Yes
Existing integration
SqlDatabaseProjects
Overview
You currently cannot pass a database created with
AddAzureSqlServer
as a reference when callingAddSqlProject
.The proposal is to add functionality so that there is the ability to deploy dacpac style projects to both SQL containers and Azure SQL.
Usage example
Breaking change?
No
Alternatives
Potentially could be a separate package although adding to SqlDatabaseProjects is likely to be a smoother experience for consumers.
Additional context
No response
Help us help you
Yes, but only if others can assist
The text was updated successfully, but these errors were encountered: