I have a query pack bicep template like so:
resource QueryPack 'microsoft.operationalInsights/querypacks@2019-09-01' = {
name: 'myQueryPack'
location: '<location>'
properties: {}
}
resource QueryPack_00000000_0000_0000_0000_000000000000 'microsoft.operationalInsights/querypacks/queries@2019-09-01' = {
parent: QueryPack
name: '00000000-0000-0000-0000-000000000000'
properties: {
displayName: 'Descriptive name for my query'
description: 'Nice description with more info'
body: '<query>'
related: {
categories: []
resourceTypes: [
'microsoft.insights/components'
]
}
tags: {
labels: [
'<label>'
]
}
}
}
I also have a separate template that deploys the resource group and other resources. The problem is this: when I deploy all of this and create a new resource group, when I access application insights the query packs from every single resource group in that subscription all show up. So I will have 5 similar resource groups deployed and I will have 5 duplicates for each query.
I suspect I am doing something wrong with scoping this query pack template. Any insight on this?