Skip to content
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

Closed
mick62 opened this issue Jul 11, 2019 · 7 comments
Closed

"az resource list --tag" gives strange error #9916

mick62 opened this issue Jul 11, 2019 · 7 comments
Assignees
Labels
ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group bug This issue requires a change to an existing behavior in the product in order to be resolved. Resource Manager-cli Workaround
Milestone

Comments

@mick62
Copy link

mick62 commented Jul 11, 2019

Describe the bug

Command Name
az resource list

Errors:

you cannot use the tag filter with other filters

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • I assigned tag (key) 'customer' for 2 of my storage accounts.
  • az resource list --tag 'customer'

Expected Behavior

JSON text with description of the 2 resources which have tag 'customer' assigned.

Environment Summary

Windows-10-10.0.16299-SP0
Python 3.6.6
Shell: powershell.exe

azure-cli 2.0.65 *

Additional Context

@tjprescott
Copy link
Member

If you run the command with --debug, what is the first line (starts with command_arguments:)?

@mick62
Copy link
Author

mick62 commented Jul 12, 2019 via email

@tjprescott
Copy link
Member

Probably to avoid logging potentially sensitive info. If you run az configure do you have any defaults set like resource group?

@mick62
Copy link
Author

mick62 commented Jul 12, 2019 via email

@tjprescott
Copy link
Member

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 --tag.

@tjprescott tjprescott added bug This issue requires a change to an existing behavior in the product in order to be resolved. Workaround and removed Needs Triage labels Jul 15, 2019
@tjprescott tjprescott added this to the Backlog milestone Jul 15, 2019
@tjprescott
Copy link
Member

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.

@mozehgir mozehgir added ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group and removed Resource Manager labels Aug 14, 2019
@haroldrandom haroldrandom added ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group bug This issue requires a change to an existing behavior in the product in order to be resolved. Resource Manager-cli Workaround labels Oct 25, 2019
@yonzhan yonzhan modified the milestones: Backlog, S164 Dec 8, 2019
@yonzhan
Copy link
Collaborator

yonzhan commented Dec 8, 2019

add to S164.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARM az resource/group/lock/tag/deployment/policy/managementapp/account management-group bug This issue requires a change to an existing behavior in the product in order to be resolved. Resource Manager-cli Workaround
Projects
None yet
Development

No branches or pull requests

6 participants