QuestionQ47
VerifiedSecure, monitor, troubleshoot Azure solutionsYou plan to deploy a container to an Azure App Service API app named api1. The source code for api1 is hosted in a GitHub repository. The container uses the API key at runtime to connect to a backend service.
The container must be able to retrieve the API key at runtime without exposing it in the source repository or Git commit history.
You need to ensure that the API key remains outside of Git commit history and is available to the container at runtime.
Solution: Hardcode the API key as an environment variable in the Dockerfile.
Does this solution achieve the goal?
Community Discussion