-
Notifications
You must be signed in to change notification settings - Fork 3.4k
az tag command doesn't support space in tag value or name in Azure cli Windows editon. #28861
Copy link
Copy link
Open
Labels
ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupAuto-AssignAuto assign by botAuto assign by botService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.act-identity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Metadata
Metadata
Assignees
Labels
ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupAuto-AssignAuto assign by botAuto assign by botService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.act-identity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Describe the bug
Based on below doc, it should work:
https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/tag-resources-cli#handling-spaces
Validated it's working for Linux Azure cli but not for Windows Azure cli:
Related command
az tag update
Errors
(InvalidTagName) The tag name must be non-null, non-empty and non-whitespace only. Please provide an actual value.
Code: InvalidTagName
Message: The tag name must be non-null, non-empty and non-whitespace only. Please provide an actual value.
Issue script & Debug output
cli.azure.cli.core.sdk.policies: {"error":{"code":"InvalidTagName","message":"The tag name must be non-null, non-empty and non-whitespace only. Please provide an actual value."}}
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 664, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 731, in _run_jobs_serially
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 701, in _run_job
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 334, in call
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/resource/custom.py", line 4112, in update_tag_at_scope
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/tracing/decorator.py", line 76, in wrapper_use_tracer
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/mgmt/resource/resources/v2022_09_01/operations/_operations.py", line 12859, in begin_update_at_scope
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/mgmt/resource/resources/v2022_09_01/operations/_operations.py", line 12723, in _update_at_scope_initial
azure.core.exceptions.HttpResponseError: (InvalidTagName) The tag name must be non-null, non-empty and non-whitespace only. Please provide an actual value.
Code: InvalidTagName
Message: The tag name must be non-null, non-empty and non-whitespace only. Please provide an actual value.
cli.azure.cli.core.azclierror: (InvalidTagName) The tag name must be non-null, non-empty and non-whitespace only. Please provide an actual value.
Code: InvalidTagName
Message: The tag name must be non-null, non-empty and non-whitespace only. Please provide an actual value.
az_command_data_logger: (InvalidTagName) The tag name must be non-null, non-empty and non-whitespace only. Please provide an actual value.
Code: InvalidTagName
Message: The tag name must be non-null, non-empty and non-whitespace only. Please provide an actual value.
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x000001D89E8E22A0>]
Expected behavior
same as Linux Azure cli
Environment Summary
{
"azure-cli": "2.60.0",
"azure-cli-core": "2.60.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {}
}
Additional context
No response