az tag remove-value trims spaces
See original GitHub issueDescribe the bug
When running: az tag remove-value --name 'TagName' --value 'TagValue' --subscription "SubscriptionName", if Tagvalue ends with a space, the space is trimmed.
Also note that symbols (like %) are double encoded.
To Reproduce See above
Expected behavior The space should not be trimmed.
Environment summary Windows Powershell
Additional context Both symbols and spaces are supported when creating tags (via the UI and ARM at least)
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (8 by maintainers)
Top Results From Across the Web
Space separated values; how to provide a value containing a ...
My goal is to store multiple tags in a variable and provide that variable to the --tags option of several az commands in...
Read more >js to remove value Code Example - Code Grepper
“js to remove value” Code Answer · how to remove a specific element from array in javascript · Browse Javascript Answers by Framework....
Read more >Removing Leading and Trailing Spaces in Excel & Google Docs
The Trim function. The most obvious (and generally efficient) method for removing both leading and trailing space is to use the TRIM() ...
Read more >vim book - Startitup
Jump to a subject: Position the cursor on a tag between | bars | and hit CTRL-]. With the mouse: ... < command...
Read more >Pandas remove special characters from column names
First, specify the trim_character, which is the character that the TRIM ... Let's finish cleaning our column labels by: Replacing spaces with underscores....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

What Azure Portal creates is not a predefined tag which can’t be edited by Azure CLI. For example, I added a tag
testtagto a resource group in Azure Portal, then runCreate a predefined tag with CLI:
Then add value with space to it:
Note that the space
%20does appear in the URLhttps://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/tagNames/pretag/tagValues/value1%20for Tags - Create Or Update Value REST API, but is discarded in the response"tagValue":"value1".However, if the value is added by directly adding a
name: valuetag to a resource group, it can retain the space with"pretag": "value2 ":The space is also retained when showing the tag:
There may be some limitation or transformation on the on service API. @zhoxing-ms, I think we may need to confirm with service team whether this is by design.
Hi, we’re sending this friendly reminder because we haven’t heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don’t hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!