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
You might not want to pass secrets to the shell, to minimize the chance of secret leaks (e.g. set -x)
Describe the solution you'd like
It seems like the general mechanism already exists: https://learn.microsoft.com/en-us/cli/azure/azure-cli-configuration#cli-configuration-values-and-environment-variables. All we need is to make it generic, perhaps some mapping like az foo list --name bar => $env:AZURE__FOO__LIST__NAME="bar". And then when I run az foo list, the --name argument would default to bar. In my specific case, I'd do something like $env:AZURE__LOGIN__USE_CERT_SN_ISSUER=$true and then all my logins would support SNI automatically.
Describe alternatives you've considered
Specific environment variables could be added for each requested scenario (for example the az login configuration requested here: #10241). However, this would be a never-ending chase for more and more configuration. IMHO it would be much better to have a generic mechanism that works for everything.
Related command
azIn automated scenarios (especially CI/CD), passing in some arguments in the command line can be problematic
set -x)Describe the solution you'd like
It seems like the general mechanism already exists: https://learn.microsoft.com/en-us/cli/azure/azure-cli-configuration#cli-configuration-values-and-environment-variables. All we need is to make it generic, perhaps some mapping like
az foo list --name bar=>$env:AZURE__FOO__LIST__NAME="bar". And then when I runaz foo list, the--nameargument would default tobar. In my specific case, I'd do something like$env:AZURE__LOGIN__USE_CERT_SN_ISSUER=$trueand then all my logins would support SNI automatically.Describe alternatives you've considered
Specific environment variables could be added for each requested scenario (for example the
az loginconfiguration requested here: #10241). However, this would be a never-ending chase for more and more configuration. IMHO it would be much better to have a generic mechanism that works for everything.Additional Context
A similar approach is taken by ASP.NET: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-8.0#default-application-configuration-sources
Possibly related: #709