Hi team,
I moved this from here: https://github.com/MicrosoftDocs/azure-docs.pl-pl/issues/469
@siudeks commented 2 hours ago — with docs.microsoft.com
Azure CLI scripts on the page are working well for single-word tags and values. For instance, when tag=value is abc=def (abc - tag name, def - tag value) - scripts are working well.
In case when spaces are in tag - like a b c=d e f, tags from resource group to resources are copied partially.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@siudeks Thank you for your feedback! We will review and update as appropriate.
This also appears to be similar to #43741
@siudeks Thanks fore reaching out!! Can you please share the resources for which the tags are being applied partially so that we can verify and assist you accordingly?
I temporary removed spaces inside my tags (names and values), so my tagging looks well but is impractical. As the result my tagging (right now) does not reflect the problem
My question - how looking to tagging of my resources would help with improving script which does not include spaces? Do you have problem with reproducing the issue?
I tried to reproduce the issue from my end and I could see the resources were being tagged even though if tags has spaces.Except for few resources like Traffic manager, the tags with spaces weren't enforced ( which is known limitation). So as you mentioned that some of the tags were applied partially , I would like to know the resources for which the tags were applied partially so that I can verify from my end and check whether they were supported or not and let you know.
Steps to reproduce
Create resource group and add a tag with value (spaces included)
Example: resource group siudeks-lab, tag: "my tag"="my value"

Add a resource (e.g. storage account) into the resource group
groups=siudeks-lab
for rg in $groups
do
jsontag=$(az group show -n $rg --query tags -o json)
t=$(echo $jsontag | tr -d '"{},' | sed 's/: /=/g')
r=$(az resource list -g $rg --query [].id --output tsv)
for resid in $r
do
jsonrtag=$(az resource show --id $resid --query tags -o json)
rt=$(echo $jsonrtag | tr -d '"{},' | sed 's/: /=/g')
az resource tag --tags $t$rt --id $resid
done
done
Expected:
resource's tag

Actual:

@siudeks Thanks for the information.
@tfitzmac Can you please review the document and update the example ?
Thanks for this feedback. I have added an example that shows how to apply tags that include spaces.