Skip to content

Instantly share code, notes, and snippets.

@TheCloudScout
Created July 13, 2022 20:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TheCloudScout/7902712c6fba7e40834276487c002a33 to your computer and use it in GitHub Desktop.
Save TheCloudScout/7902712c6fba7e40834276487c002a33 to your computer and use it in GitHub Desktop.
"resources": [
{
"type": "microsoft.operationalInsights/querypacks",
"apiVersion": "2019-09-01-preview",
"name": "[parameters('queryPackName')]",
"location": "[resourceGroup().location]",
"properties": {}
},
{
"type": "microsoft.operationalInsights/querypacks/queries",
"apiVersion": "2019-09-01-preview",
"name": "[concat(parameters('queryPackName'), '/', guid(string(parameters('queryPackQueries')[copyIndex()].displayName)))]",
"dependsOn": [
"[resourceId('microsoft.operationalInsights/querypacks', parameters('queryPackName'))]"
],
"copy": {
"name": "queryPackQueries",
"count": "[length(parameters('queryPackQueries'))]"
},
"properties": {
"displayName": "[parameters('queryPackQueries')[copyIndex()].displayName]",
"body": "[parameters('queryPackQueries')[copyIndex()].body]",
"related": {
"categories": [],
"resourceTypes": [
"microsoft.operationalinsights/workspaces"
]
},
"tags": {
"labels": [
"[parameters('queryPackQueries')[copyIndex()].labels]"
]
}
}
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment