What does “hidden-link:” mean in Azure Resource Manager Tags

后端 未结 3 1571
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-04 02:39

I exported an Azure Resource Manager JSON template from my resource group on Azure. I see a bunch of tags in the generated file like:

\"tags\": {
    \"hidde         


        
相关标签:
3条回答
  • 2021-01-04 02:54

    Just to help stop anyone else from wasting a couple of hours in frustration:

    Don't remove these tags from your generated ARM template for web tests in Application Insights.

    I was wondering if I really needed these tags since they were very specific to the resource that I used to create the template from. Reading this answer I figured that it wasn't necessary so I removed them and promptly forgot about removing them.

    The deployment then started failing with the very descriptive error:

    {
     "code": "BadRequest",
     "message": "{
       "code": "BadRequest",
       "message": "Bad Request\",
       "innererror": 
        {
           "diagnosticcontext": "d657bd3b-6b5f-4b24-8963-c2e9ac76a65b\",
           "time": "2019-02-05T13:37:23.6473698Z"
        }
    }
    

    Putting the "hidden-links" back in seems to fix the issue.

    An alternative that makes the script a bit more reusable is specifying the "hidden-link" as follows:

    "tags": { "[concat('hidden-link:', resourceId('Microsoft.Insights/components', parameters('appInsightsName')))]": "Resource" }
    

    Where applicationInsightName is a variable containing the name of the ApplicationInsight instance

    0 讨论(0)
  • 2021-01-04 03:09

    These tags are used to associate related resources. They are used to populate the Linked Resources section. Removing the tags will prevent resources from displaying as Linked Resources but will not impact any functionality.

    0 讨论(0)
  • 2021-01-04 03:13

    Azure Resource Manager (ARM) tag is optional to an Azure Resource or an Azure Resource Group.

    You can safely remove any tag without affecting your ARM deployment.

    0 讨论(0)
提交回复
热议问题