-
Notifications
You must be signed in to change notification settings - Fork 0
Azure SQL Database configuration parameters and module #274
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -406,9 +406,27 @@ var dbAccountName = !empty(azureDbAccountName) ? azureDbAccountName : 'dbgpt0-${ | |||||
| @description('Cosmos DB Database Name. Use your own name convention or leave as it is to generate a random name.') | ||||||
| param azureDbDatabaseName string = '' | ||||||
| var dbDatabaseName = !empty(azureDbDatabaseName) ? azureDbDatabaseName : 'db0-${resourceToken}' | ||||||
| @description('Azure SQL Server Name.') | ||||||
| param azureSqlServerName string = '' | ||||||
| var sqlServerName = !empty(azureSqlServerName) ? azureSqlServerName : 'sqlgpt0-${resourceToken}' | ||||||
| @description('Azure SQL Database Name.') | ||||||
| param azureSqlDatabaseName string = '' | ||||||
| var sqlDatabaseName = !empty(azureSqlDatabaseName) ? azureSqlDatabaseName : 'sqldb0-${resourceToken}' | ||||||
| @description('Azure SQL administrator login name.') | ||||||
| param azureSqlAdministratorLogin string = '' | ||||||
| @description('Azure SQL administrator password.') | ||||||
| @secure() | ||||||
| param azureSqlAdministratorPassword string | ||||||
| @description('Key Vault secret name to store the Azure SQL administrator password.') | ||||||
| param azureSqlAdminSecretName string = '' | ||||||
|
||||||
| param azureSqlAdminSecretName string = '' | |
| param azureSqlAdminSecretName string = 'sql-admin-password' |
Copilot
AI
Feb 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hard-coded location 'eastus2' may cause deployment issues if the primary deployment location specified in the location parameter is different. This creates a potential mismatch where the SQL Server is deployed to a different region than other resources.
While hard-coded locations are used in this codebase for specific services with regional availability constraints (e.g., visionIngestion uses 'westus', o1Deployment uses 'eastus2'), consider whether this SQL Server deployment has similar constraints. If not, using the location parameter would provide more flexibility and keep resources colocated.
If the hard-coded location is intentional due to service availability, add a comment explaining the reason (e.g., '//Workaround for service availability') to maintain consistency with the existing pattern at line 897.
| location: 'eastus2' | |
| location: location |
Copilot
AI
Feb 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The SQL Server module is deployed but the connection information (server name, database name, connection string) is not being passed to any application components (orchestrator, frontend, dataIngestion, mcpServer).
The outputs AZURE_SQL_SERVER_NAME and AZURE_SQL_DATABASE_NAME are exposed at lines 2155-2156, but no application settings are configured to use these values. This suggests the SQL Server may not be fully integrated.
If this SQL Server is intended to be used by the application, consider adding the necessary connection information to the appSettings of the relevant modules. For example:
- SQL_SERVER_NAME or DATABASE_SERVER
- SQL_DATABASE_NAME or DATABASE_NAME
- SQL_CONNECTION_STRING (retrieving the password from Key Vault)
If the SQL Server is not yet intended to be used and this is preparatory infrastructure, consider making the module deployment conditional to avoid unnecessary resource costs.
Copilot
AI
Feb 19, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When network isolation is enabled, other database resources (like Cosmos DB at line 918) have private endpoints configured with corresponding DNS zones. However, no private endpoint is configured for the SQL Server.
If network isolation is a feature that should apply to all database services consistently, consider adding:
- A SQL DNS zone module (similar to blobDnsZone, documentsDnsZone, etc.)
- A private endpoint module for SQL Server (similar to cosmospe at line 918)
This ensures consistent network security across all database resources when networkIsolation is enabled. If SQL Server doesn't require network isolation by design, the publicNetworkAccess parameter can handle this, but the inconsistency with other databases should be documented.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -50,6 +50,24 @@ | |||||||||||||||||
| "azureDbDatabaseName": { | ||||||||||||||||||
| "value": "${AZURE_DB_DATABASE_NAME}" | ||||||||||||||||||
| }, | ||||||||||||||||||
| "azureSqlServerName": { | ||||||||||||||||||
| "value": "" | ||||||||||||||||||
| }, | ||||||||||||||||||
| "azureSqlDatabaseName": { | ||||||||||||||||||
| "value": "" | ||||||||||||||||||
|
Comment on lines
+54
to
+57
|
||||||||||||||||||
| "value": "" | |
| }, | |
| "azureSqlDatabaseName": { | |
| "value": "" | |
| "value": "${AZURE_SQL_SERVER_NAME}" | |
| }, | |
| "azureSqlDatabaseName": { | |
| "value": "${AZURE_SQL_DATABASE_NAME}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The azureSqlAdministratorLogin parameter defaults to an empty string but is required by the SQL Server resource. If the AZURE_SQL_ADMIN_LOGIN environment variable is not set, this will cause a deployment failure.
Consider either:
This prevents silent failures during deployment and improves the developer experience.