SaaS - Environment Specific Variables
I see that in the future we will have access to Azure Key Vault for SaaS, to have sensitive variable values per environment which is great.
However, what is the recommended approach today? Does each SaaS environment (QA, UAT, and PROD) have an appropriate ASPNETCORE_ENVIRONMENT
set, so we can have appsettings per environment? e.g. appsettings.{environment}.json
Answers
Yep, one appsettings.{environment}.json
for each environment is one approach. The SaaS hosting correctly sets the ASPNETCORE_ENVIRONMENT
when the application starts up which is why the environment specific extension methods work.
Many teams already populate a configuration file in a CD pipeline using something like variables and variables groups in Azure DevOps.
You can also store variables in Xperience with a custom settings module. You will likely want to exclude this settings object type in the repository.config
to prevent overwriting environment data with local data. This approach can be convenient but requires you to secure configuration with role management.
Once we have Azure Key Vault support for SaaS you'll have an additional option.
To answer this question, you have to login first.