Azure Container Apps · AZ-204: Developing Solutions for Microsoft Azure Develop Azure Compute Solutions

An Azure Container App needs a database connection string. The connection string must not be stored in the container image or supplied as plaintext i…

Practice question from Azure Container Apps (AZ-204: Developing Solutions for Microsoft Azure Develop Azure Compute Solutions), with the correct answer and a step-by-step solution.

easy · MCQ · Q-976CE5

An Azure Container App needs a database connection string. The connection string must not be stored in the container image or supplied as plaintext in the application configuration. What should you do?

  1. A.Store the connection string in the container image as an environment variable.
  2. B.Create an Azure Container Apps secret and reference it from the container's environment variable.Correct answer
  3. C.Store the connection string in the container app's public URL.
  4. D.Place the connection string in the container startup command.

Solution

Container Apps secrets can be stored separately from the image and referenced by an environment variable using a secret reference. This avoids embedding sensitive values in the image or application configuration.

More from Azure Container Apps

All of Azure Container Apps

Practise more Develop Azure Compute Solutions

Sign up free for adaptive practice on this chapter, with instant feedback and hints on every question.

Start practising free

Free to start · No credit card needed