@Teresa Silvestri , thank you for posting this question on Q&A.
I see that you are trying to add/update a new tag based on the value of another tag. This is not possible based on the resource's tag itself, as there is no direct way to refer to the resource object in ARM template. Usually, such a reference requires some form of reference()
or resourceId()
function. Please see the following link for details - reference() function in ARM template
However, if you are trying to update tag values based on a Tag which is available on ResourceGroup containing the resource, it can be done as shown in the sample here - Use tags with parameters. You may consider adding the required tag to ResourceGroup() and inheriting it to all the resources within it.
Another way to achieve this (without the use of Policy) is by using PowerShell scripting with Az modules. For one such example, please see - How to bulk update Tags with wrong casing
Hope this helps. Please let us know if you have any questions.