Azure / Azure/azure-powershell

Allow setting session configuration path (especially/account/subscription/token) - AZURE_CONFIG_DIR equivalent

Open
#15,456 8 comments 0 reactions 1 assignee Claimed by @dcaro View on GitHub
feature-request needs-team-attention
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
2d 17h
Merged PRs (30d)
51

Description

## Description of the new feature
`az cli` supports setting its session configuration folder (including current account/context/subscription/token) via a `AZURE_CONFIG_DIR` environment variable: https://docs.microsoft.com/en-us/cli/azure/azure-cli-configuration#cli-configuration-file.

This is extremely useful for the case where one works concurrently against multiple accounts (even in different cloud instances, e.g. Public/Mooncake/Fairfax/BlackForest): https://github.com/Azure/azure-cli/issues/1347

It might also provide a path for improving the PowerShell concurrency/`Start-Job` experience: https://github.com/Azure/azure-powershell/issues/9448

## Proposed implementation details
Allow overriding the [currently used %LOCALAPPDATA%](https://github.com/Azure/azure-powershell/search?q=LocalApplicationData) with a user-supplied environment variable (e.g. `AZ_CONFIG_DIR`).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.