Sunday, 26 May 2024

Manage environment variables on Azure Container Apps

 

Manage environment variables on Azure Container Apps

In Azure Container Apps, you're able to set runtime environment variables. These variables can be set as manually entries or as references to secrets. These environment variables are loaded onto your Container App during runtime.

Configure environment variables

You can configure the Environment Variables upon the creation of the Container App or later by creating a new revision.

If you're creating a new Container App through the Azure portal, you can set up the environment variables on the Container section:

Screenshot of Container App creation page.

Add environment variables on existing container apps

After the Container App is created, the only way to update the Container App environment variables is by creating a new revision with the needed changes.

  1. In the Azure portal, search for Container Apps and then select your app.

    Screenshot of the Azure portal search bar with Container App as one of the results.

  2. In the app's left menu, select Revisions and replicas > Create new revision

    Screenshot of Container App Revision creation page.

  3. Then you have to edit the current existing container image:

    Screenshot of Container App Revision container image settings page.

  4. In the Environment variables section, you can Add new Environment variables by clicking on Add.

  5. Then set the Name of your Environment variable and the Source (it can be a reference to a secret).

    Screenshot of Container App Revision container image environment settings section.

    1. If you select the Source as manual, you can manually input the Environment variable value.

      Screenshot of Container App Revision container image environment settings section with one of the environments source selected as Manual.

No comments:

Post a Comment