QuestionQ61

VerifiedSecure, optimize, and deploy database solutions

You have an Azure SQL database named ProductsDB.

You deploy Data API builder (DAB) to Azure Container Apps by using the mcr.microsoft.com/azure-databases/data-api-builder:latest image.

The container app has these configurations:

  • Secrets: mssql-connection-string, dab-config-base64
  • Environment variables:
    • MSSQL_CONNECTION_STRING=secretref:mssql-connection-string
    • DAB_CONFIG_BASE64=secretref:dab-config-base64
  • Ingress: External on port 5000

Users report that the /health endpoint returns a healthy response, but every request that queries an entity named Products fails and produces a connection error.

You confirm that the SQL login in the connection string is correct and that the database exists.

You need to ensure that the container app can establish connections to the Azure SQL logical server without changing the container app deployment settings or the DAB configuration file.

What should you do on the Azure SQL logical server?

Explanation

Azure SQL Database requires its logical server firewall to allow connections from Azure-hosted resources. A server-level rule whose start and end IP addresses are both 0.0.0.0 enables Azure services and resources to pass through the firewall and attempt database connections. This is the network setting required for the container app to connect when its credentials and database are already valid.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!