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

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.

enter image description here


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