Skip to content

Commit

Permalink
fix: Update DCR creation to Clusters resource group instead of worksp…
Browse files Browse the repository at this point in the history
…ace (ARM Template update) (#819)
  • Loading branch information
bragi92 authored Sep 13, 2022
1 parent d0ac394 commit 04d4412
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,17 @@
"clusterResourceGroup": "[split(parameters('aksResourceId'),'/')[4]]",
"clusterName": "[split(parameters('aksResourceId'),'/')[8]]",
"clusterLocation": "[replace(parameters('aksResourceLocation'),' ', '')]",
"workspaceSubscriptionId": "[split(parameters('workspaceResourceId'),'/')[2]]",
"workspaceResourceGroup": "[split(parameters('workspaceResourceId'),'/')[4]]",
"dcrName": "[Concat('MSCI', '-', variables('clusterName'), '-', variables('clusterLocation'))]",
"associationName": "ContainerInsightsExtension",
"dataCollectionRuleId": "[resourceId(variables('workspaceSubscriptionId'), variables('workspaceResourceGroup'), 'Microsoft.Insights/dataCollectionRules', variables('dcrName'))]"
"dataCollectionRuleId": "[resourceId(variables('clusterSubscriptionId'), variables('clusterResourceGroup'), 'Microsoft.Insights/dataCollectionRules', variables('dcrName'))]"
},
"resources": [
{
"type": "Microsoft.Resources/deployments",
"name": "[Concat('aks-monitoring-msi-dcr', '-', uniqueString(variables('dcrName')))]",
"apiVersion": "2017-05-10",
"subscriptionId": "[variables('workspaceSubscriptionId')]",
"resourceGroup": "[variables('workspaceResourceGroup')]",
"subscriptionId": "[variables('clusterSubscriptionId')]",
"resourceGroup": "[variables('clusterResourceGroup')]",
"properties": {
"mode": "Incremental",
"template": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,17 @@
"clusterResourceGroup": "[split(parameters('clusterResourceId'),'/')[4]]",
"clusterName": "[split(parameters('clusterResourceId'),'/')[8]]",
"clusterLocation": "[replace(parameters('clusterRegion'),' ', '')]",
"workspaceSubscriptionId": "[split(parameters('workspaceResourceId'),'/')[2]]",
"workspaceResourceGroup": "[split(parameters('workspaceResourceId'),'/')[4]]",
"dcrName": "[Concat('MSCI', '-', variables('clusterName'), '-', variables('clusterLocation'))]",
"associationName": "ContainerInsightsExtension",
"dataCollectionRuleId": "[resourceId(variables('workspaceSubscriptionId'), variables('workspaceResourceGroup'), 'Microsoft.Insights/dataCollectionRules', variables('dcrName'))]"
"dataCollectionRuleId": "[resourceId(variables('clusterSubscriptionId'), variables('clusterResourceGroup'), 'Microsoft.Insights/dataCollectionRules', variables('dcrName'))]"
},
"resources": [
{
"type": "Microsoft.Resources/deployments",
"name": "[Concat('arc-k8s-monitoring-msi-dcr', '-', uniqueString(variables('dcrName')))]",
"apiVersion": "2017-05-10",
"subscriptionId": "[variables('workspaceSubscriptionId')]",
"resourceGroup": "[variables('workspaceResourceGroup')]",
"subscriptionId": "[variables('clusterSubscriptionId')]",
"resourceGroup": "[variables('clusterResourceGroup')]",
"properties": {
"mode": "Incremental",
"template": {
Expand Down

0 comments on commit 04d4412

Please sign in to comment.