azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

az postgres up: continues using resource group that's not present in config files

Open chenlomis opened this issue 6 years ago • 3 comments

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Describe the bug

"When creating a database with az postgres up, I set a resource group on the first run. The resource group continued to be used as a default for subsequent runs, even though it was not present in the home or project directory .azure/config file.

More details in this video walking through the process: "

To Reproduce Steps to reproduce the behavior.

Expected behavior A clear and concise description of what you expected to happen.

Environment summary Install Method (e.g. pip, interactive script, apt-get, Docker, MSI, edge build) / CLI version (az --version) / OS version / Shell Type (e.g. bash, cmd.exe, Bash on Windows)

Additional context Add any other context about the problem here.

chenlomis avatar Dec 20 '19 18:12 chenlomis

add to S164.

yonzhan avatar Dec 21 '19 12:12 yonzhan

Reproduced. I will take a look at it.

Juliehzl avatar Mar 12 '20 06:03 Juliehzl

Actually the config file is in user ~/.azext_db_up. e.g.

[sql_up]
location = westus2
group = group8965944754
server = server423611410
login = cynicalBuffalo2
database = sampledb

[postgres_up]
location = eastus2euap
group = zuh
server = server458246064
login = remoteQuiche4
database = sampledb

From code https://github.com/Azure/azure-cli-extensions/blob/master/src/db-up/azext_db_up/_validators.py#L33-L44, we can find the set operation.

Note: Don't find a way to clear these information.

Juliehzl avatar Mar 12 '20 12:03 Juliehzl