You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Separated the Azure CLI sample with a secret and non-secret example
- Added an introduction to the Adding environment variables on existing container apps section
- Added spaces in-between images
- Fixed a typo
Copy file name to clipboardExpand all lines: articles/container-apps/environment-variables.md
+15-4Lines changed: 15 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,13 +28,20 @@ If you're creating a new Container App through the [Azure portal](https://portal
28
28
29
29
You can create your Container App with enviroment variables using the [az containerapp create](/cli/azure/containerapp#az-containerapp-create) command by passing the environment variables as space-separated 'key=value' entries using the `--env-vars` parameter.
30
30
31
-
If you want to reference a secret, you have to ensure that the secret you want to reference is already created, see [Manage secrets](manage-secrets.md). You can use the secret name and pass it to the value field but starting with `secretref:`
32
-
33
31
```azurecli
34
32
az containerapp create -n my-containerapp -g MyResourceGroup \
If you want to reference a secret, you have to ensure that the secret you want to reference is already created, see [Manage secrets](manage-secrets.md). You can use the secret name and pass it to the value field but starting with `secretref:`
## Adding environment variables on existing container apps
78
85
86
+
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.
87
+
79
88
### [Azure portal](#tab/portal)
80
89
81
90
1. In the [Azure portal](https://portal.azure.com), search for Container Apps and then select your app.
1. If you select the Source as manual, you can manually input the Environment variable value.
102
+
92
103
:::image type="content" source="media/environment-variables/manual-env-var.png" alt-text="Screenshot of Container App Revision container image environment settings section with one of the environments source selected as Manual.":::
93
104
94
105
### [Azure CLI](#tab/cli)
@@ -106,7 +117,7 @@ az containerapp update \
106
117
107
118
If you want to create multiple environment variables, you can insert space-separated values in the 'key=value' format.
108
119
109
-
If you want to reference a secret, you have to ensure that the secret you want to reference is already created, see [Manage secrets](manage-secrets.md). You can use the secret name and pass it to the value field but starting with `secretref:`, see the following image:
120
+
If you want to reference a secret, you have to ensure that the secret you want to reference is already created, see [Manage secrets](manage-secrets.md). You can use the secret name and pass it to the value field but starting with `secretref:`, see the following example:
0 commit comments