-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"az resource list --tag" gives strange error #9916
Comments
If you run the command with --debug, what is the first line (starts with command_arguments:)? |
Command entered:
az resource list --tag 'customer' --debug
Result:
Command arguments: ['resource', 'list', '--tag', 'customer', '--debug']...az_command_data_logger : command args: resource list --tag {} --debug
...cli.azure.cli.core.util : you cannot use the tag filter with other filters
you cannot use the tag filter with other filters...
Content of log file in ~\.azure\commands:
CMD-LOG-LINE-BEGIN 21488 | 2019-07-12 18:56:44,648 | INFO | az_command_data_logger | command args: resource list --tag {} --debug
CMD-LOG-LINE-BEGIN 21488 | 2019-07-12 18:56:45,161 | ERROR | cli.azure.cli.core.util | you cannot use the tag filter with other filters
CMD-LOG-LINE-BEGIN 21488 | 2019-07-12 18:56:45,164 | INFO | az_command_data_logger | exit code: 1
Why is it changed to "--tag {}" in the log file?
Am Donnerstag, 11. Juli 2019, 20:42:23 MESZ hat Travis Prescott <notifications@github.com> Folgendes geschrieben:
If you run the command with --debug, what is the first line (starts with command_arguments:)?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Probably to avoid logging potentially sensitive info. If you run |
az configure
entered in VS Code terminal displays:
...
Your current configuration is as follows:
[cloud]
name = AzureCloud
[defaults]
output = table
location = eastus
--
entered in Web Shell displays:...
Your current configuration is as follows:
[cloud]
name = AzureCloud
[core]
first_run = yes
[defaults]
location = eastus
Environment variables:
AZURE_ACCESS_TOKEN_FILE = /tmp/accessTokens.json
AZURE_HTTP_USER_AGENT = cloud-shell/1.0
--
Am Freitag, 12. Juli 2019, 20:34:38 MESZ hat Travis Prescott <notifications@github.com> Folgendes geschrieben:
Probably to avoid logging potentially sensitive info. If you run az configure do you have any defaults set like resource group?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Yes, this is occurring because you have a default location set. It is using the default location and applying it as a filter, which cannot be used in conjunction with |
The workaround would be to unset your default location before running the command. The validation should be updated to ignore location if it is simply set by the default. |
add to S164. |
Describe the bug
Command Name
az resource list
Errors:
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az resource list --tag 'customer'
Expected Behavior
JSON text with description of the 2 resources which have tag 'customer' assigned.
Environment Summary
Additional Context
The text was updated successfully, but these errors were encountered: