An Azure service that provides a general-purpose, serverless container platform.
Hi @Abdullah Shakeel Welcome to Microsoft Q&A, and thank you for your question.
Azure Container Apps environment variables are stored as name/value pairs, where the value is treated as a string at runtime. Azure Container Apps does not provide a native array-type environment variable.
If you need to store multiple values, the supported approach is to store them as a single string value, commonly in JSON format, and then parse the value within your application.
For example:
DOMAIN_SIGNUP_SPECIAL_DOMAINS=["x.net","y.com","y-itc.com"]
Your application can then deserialize this JSON string into an array/list at runtime.
Microsoft documentation for Azure Container Apps environment variables:
https://learn.microsoft.com/azure/container-apps/environment-variables
Therefore, storing an array-like value as a JSON-formatted string in an environment variable and parsing it in the application is the recommended approach for this scenario.
If the assistance was helpful, kindly take a moment to click on Accept Answer and click on Yes. It will be helpful for other community members.
Thank you!