An Azure service that provides a general-purpose, serverless container platform.
Azure Container Apps supports environment variables as runtime string values, including secret references. The provided documentation shows how to set key=value pairs, but it does not document any special array type for environment variables.
Supported conclusion:
- Azure Container Apps environment variables are configured as name/value entries.
- Secrets can be referenced as environment variable values.
- If duplicate variable names exist, the last one wins.
- Updating environment variables creates a new revision.
There is no documentation here confirming a native array-valued environment variable type for Azure Container Apps.
For an array such as:
domain_signup__special_domains=["x.net","y.com","y-itc.com"]
the officially supported approach in the available documentation is to store it as a string value in an environment variable and have the application parse it at runtime.
If the value is sensitive, store it as a secret and reference that secret from the environment variable:
az containerapp update \
-n <APP NAME>
-g <RESOURCE_GROUP_NAME>
--set-env-vars domain_signup__special_domains='["x.net","y.com","y-itc.com"]'
Or, if treated as sensitive configuration, store it as a secret first and then reference it:
az containerapp secret set \
--resource-group "<RESOURCE_GROUP>" \
--name "<FUNCTIONS_APP_NAME>" \
--secrets "special-domains=[\"x.net\",\"y.com\",\"y-itc.com\"]"
az containerapp update \
-n <APP NAME>
-g <RESOURCE_GROUP_NAME>
--set-env-vars domain_signup__special_domains=secretref:special-domains
The documentation provided does not state a more specific Microsoft-recommended encoding for arrays beyond using environment variables as string values or secret references.
References: