Skip to content

Commit a175037

Browse files
fix: Update log analytics destination name variable in Bicep and JSON templates
1 parent 00d58ae commit a175037

3 files changed

Lines changed: 16 additions & 13 deletions

File tree

infra/main.bicep

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ module bastionHost 'br/public:avm/res/network/bastion-host:0.8.2' = if (enablePr
377377

378378

379379
var dataCollectionRulesResourceName = 'dcr-${solutionSuffix}'
380+
var dcrLogAnalyticsDestinationName = 'la-${logAnalyticsWorkspaceResourceName}-destination'
380381
var dataCollectionRulesLocation = useExistingLogAnalytics
381382
? existingLogAnalyticsWorkspace!.location
382383
: logAnalyticsWorkspace!.outputs.location
@@ -463,7 +464,7 @@ module windowsVmDataCollectionRules 'br/public:avm/res/insights/data-collection-
463464
logAnalytics: [
464465
{
465466
workspaceResourceId: logAnalyticsWorkspaceResourceId
466-
name: 'la--1264800308'
467+
name: dcrLogAnalyticsDestinationName
467468
}
468469
]
469470
}
@@ -473,7 +474,7 @@ module windowsVmDataCollectionRules 'br/public:avm/res/insights/data-collection-
473474
'Microsoft-Perf'
474475
]
475476
destinations: [
476-
'la--1264800308'
477+
dcrLogAnalyticsDestinationName
477478
]
478479
transformKql: 'source'
479480
outputStream: 'Microsoft-Perf'
@@ -483,7 +484,7 @@ module windowsVmDataCollectionRules 'br/public:avm/res/insights/data-collection-
483484
'Microsoft-Event'
484485
]
485486
destinations: [
486-
'la--1264800308'
487+
dcrLogAnalyticsDestinationName
487488
]
488489
transformKql: 'source'
489490
outputStream: 'Microsoft-Event'

infra/main.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"_generator": {
77
"name": "bicep",
88
"version": "0.43.8.12551",
9-
"templateHash": "1762309424496235679"
9+
"templateHash": "18442421312669656903"
1010
}
1111
},
1212
"parameters": {
@@ -325,6 +325,7 @@
325325
"applicationInsightsResourceName": "[format('appi-{0}', variables('solutionSuffix'))]",
326326
"bastionHostName": "[format('bas-{0}', variables('solutionSuffix'))]",
327327
"dataCollectionRulesResourceName": "[format('dcr-{0}', variables('solutionSuffix'))]",
328+
"dcrLogAnalyticsDestinationName": "[format('la-{0}-destination', variables('logAnalyticsWorkspaceResourceName'))]",
328329
"jumpboxVmName": "[take(format('vm-jumpbox-{0}', variables('solutionSuffix')), 15)]",
329330
"privateDnsZones": [
330331
"privatelink.cognitiveservices.azure.com",
@@ -9078,7 +9079,7 @@
90789079
"logAnalytics": [
90799080
{
90809081
"workspaceResourceId": "[if(variables('useExistingLogAnalytics'), parameters('existingLogAnalyticsWorkspaceId'), reference('logAnalyticsWorkspace').outputs.resourceId.value)]",
9081-
"name": "la--1264800308"
9082+
"name": "[variables('dcrLogAnalyticsDestinationName')]"
90829083
}
90839084
]
90849085
},
@@ -9088,7 +9089,7 @@
90889089
"Microsoft-Perf"
90899090
],
90909091
"destinations": [
9091-
"la--1264800308"
9092+
"[variables('dcrLogAnalyticsDestinationName')]"
90929093
],
90939094
"transformKql": "source",
90949095
"outputStream": "Microsoft-Perf"
@@ -9098,7 +9099,7 @@
90989099
"Microsoft-Event"
90999100
],
91009101
"destinations": [
9101-
"la--1264800308"
9102+
"[variables('dcrLogAnalyticsDestinationName')]"
91029103
],
91039104
"transformKql": "source",
91049105
"outputStream": "Microsoft-Event"
@@ -29627,8 +29628,8 @@
2962729628
},
2962829629
"dependsOn": [
2962929630
"aiFoundryAiServices",
29630-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]",
2963129631
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]",
29632+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]",
2963229633
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]",
2963329634
"virtualNetwork"
2963429635
]
@@ -39943,10 +39944,10 @@
3994339944
}
3994439945
},
3994539946
"dependsOn": [
39946-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageBlob)]",
39947-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageFile)]",
3994839947
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageQueue)]",
3994939948
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageDfs)]",
39949+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageBlob)]",
39950+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageFile)]",
3995039951
"userAssignedIdentity",
3995139952
"virtualNetwork"
3995239953
]

infra/main_custom.bicep

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ module bastionHost 'br/public:avm/res/network/bastion-host:0.8.2' = if (enablePr
360360

361361

362362
var dataCollectionRulesResourceName = 'dcr-${solutionSuffix}'
363+
var dcrLogAnalyticsDestinationName = 'la-${logAnalyticsWorkspaceResourceName}-destination'
363364
var dataCollectionRulesLocation = useExistingLogAnalytics
364365
? existingLogAnalyticsWorkspace!.location
365366
: logAnalyticsWorkspace!.outputs.location
@@ -446,7 +447,7 @@ module windowsVmDataCollectionRules 'br/public:avm/res/insights/data-collection-
446447
logAnalytics: [
447448
{
448449
workspaceResourceId: logAnalyticsWorkspaceResourceId
449-
name: 'la--1264800308'
450+
name: dcrLogAnalyticsDestinationName
450451
}
451452
]
452453
}
@@ -456,7 +457,7 @@ module windowsVmDataCollectionRules 'br/public:avm/res/insights/data-collection-
456457
'Microsoft-Perf'
457458
]
458459
destinations: [
459-
'la--1264800308'
460+
dcrLogAnalyticsDestinationName
460461
]
461462
transformKql: 'source'
462463
outputStream: 'Microsoft-Perf'
@@ -466,7 +467,7 @@ module windowsVmDataCollectionRules 'br/public:avm/res/insights/data-collection-
466467
'Microsoft-Event'
467468
]
468469
destinations: [
469-
'la--1264800308'
470+
dcrLogAnalyticsDestinationName
470471
]
471472
transformKql: 'source'
472473
outputStream: 'Microsoft-Event'

0 commit comments

Comments
 (0)