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?
- A.Store the connection string in the container image as an environment variable.
- B.Create an Azure Container Apps secret and reference it from the container's environment variable.Correct answer
- C.Store the connection string in the container app's public URL.
- 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
- You deploy an Azure Container App whose web process listens on container port 8080. Users on the internet must access the application throu…
- You run version 1 of an API in an Azure Container App. You want to deploy version 2, send 10 percent of requests to version 2 for validatio…
- A workload must process messages from an Azure Service Bus queue. Each execution should run a finite containerized task, and the workload s…
- You have two Azure Container Apps in the same Container Apps environment. One app provides an internal API that must be callable by other a…
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 freeFree to start · No credit card needed