87.4k views
2 votes
You have an Azure Container Apps application named App1, using an environment named App1Env1, with revision App1Rev1, and a container named Container1. You need to create a secret accessible to the code running in App1. What should you configure?

User Jackey
by
7.9k points

1 Answer

3 votes

Final answer:

To create a secret accessible to the code running in App1, you need to configure environment variables in the Azure Container Apps application.

Step-by-step explanation:

To create a secret accessible to the code running in App1, you need to configure environment variables in the Azure Container Apps application. Environment variables can store sensitive information like secrets and are accessible to the code at runtime.

In the Azure portal, navigate to the Azure Container Apps application, App1. Go to the 'Settings' tab and click on 'Configuration'. Add a new environment variable and provide the name and value for the secret.

In the code running in App1, you can access the secret by reading the value of the environment variable using the appropriate language-specific method or library.

User Adam A Allalou
by
8.1k points