Skip to content
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

Aspire: Support azure.sql.v0, azure.sql.database.v0 #3063

Closed
Tracked by #3110 ...
ellismg opened this issue Dec 4, 2023 · 1 comment · Fixed by #3226
Closed
Tracked by #3110 ...

Aspire: Support azure.sql.v0, azure.sql.database.v0 #3063

ellismg opened this issue Dec 4, 2023 · 1 comment · Fixed by #3226
Assignees
Milestone

Comments

@ellismg
Copy link
Member

ellismg commented Dec 4, 2023

See provisioner here: https://github.com/dotnet/aspire/blob/main/src/Aspire.Hosting.Azure.Provisioning/Provisioners/SqlServerProvisioner.cs

Expected code from C# host program:

var azSqlServer = builder.AddAzureSqlServer("azsql").AddDatabase("azsqldb");

Manifest:

    "azsql": {
      "type": "azure.sql.v0"
    },
    "azsqldb": {
      "type": "azure.sql.database.v0",
      "parent": "azsql"
    },

A reference to the azure-sql-server bicep core module from azd: https://github.com/Azure/azure-dev/blob/main/templates/common/infra/bicep/core/database/sqlserver/sqlserver.bicep

This module can be use as reference to create the go-template. We won't use a Key Vault to hold credentials and we won't use a script to set up the Server-users. We should try to use RBAC.

A possible candidate to test this end2end would be this sample: https://github.com/dotnet/aspire-samples/tree/501ae2165358d019f669788e92547a36a616c91d/samples/VolumeMount

The sample requires manual intervention to set a Server password, we need to follow up with NetAspire team to know how they want to handle this. azd can prompt the user for the password and automatically create a Key Vault to keep it.

@ellismg ellismg added this to the January 2024 - 1.6.0 milestone Dec 4, 2023
@ellismg ellismg changed the title - Azure SQL - azure.sql.v0, azure.sql.database.v0 Jan Release Aspire: Support azure.sql.v0, azure.sql.database.v0 Dec 4, 2023
@chien110234 chien110234 mentioned this issue Dec 31, 2023
@weikanglim
Copy link
Contributor

weikanglim commented Jan 2, 2024

I'll not be able to work on this for next few weeks (vacation). Other investigation notes I had:

  • If using a database password, should the password be server or db scoped? DB scoped isn't currently achievable without using additional deployment scripts.
  • What are we thinking around network security? I think we'll want all managed production servers to not be publicly internet accessible, which likely requires setting up a VNet, which then likely needs networking configuration provided by the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants