Skip to content

Commit e9215d2

Browse files
fix(infra): remove legacy OMSGallery/Security solution (ADO #43311)
The Microsoft.OperationsManagement/solutions 'Security' (OMSGallery/Security) resource is a legacy artifact from the Log Analytics Agent (MMA) era. With the modern Azure Monitor Agent + Data Collection Rule pipeline used here, the SecurityEvent table is auto-provisioned by Azure Monitor on first ingestion of the Microsoft-SecurityEvent stream. The OMSGallery solution is not required and adds a marketplace plan resource for no functional benefit. - Remove the securitySolution resource from infra/main.bicep and infra/main_custom.bicep. - Drop the now-unnecessary dependsOn: [securitySolution] from the windowsVmDataCollectionRules module. - Regenerate infra/main.json from main.bicep. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 786b7e2 commit e9215d2

3 files changed

Lines changed: 8 additions & 62 deletions

File tree

infra/main.bicep

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -433,35 +433,18 @@ module jumpboxVM 'br/public:avm/res/compute/virtual-machine:0.15.0' = if (enable
433433
}
434434
}
435435

436-
// SFI: install the Azure Monitor "Security" solution on the Log Analytics
437-
// workspace so that the Microsoft-SecurityEvent stream produced by the data
438-
// collection rule below populates the SecurityEvent table. Same gate as the
439-
// DCR. (ADO #43311)
440-
resource securitySolution 'Microsoft.OperationsManagement/solutions@2015-11-01-preview' = if (enablePrivateNetworking && enableMonitoring) {
441-
name: 'Security(${logAnalyticsWorkspaceResourceName})'
442-
location: solutionLocation
443-
plan: {
444-
name: 'Security(${logAnalyticsWorkspaceResourceName})'
445-
publisher: 'Microsoft'
446-
product: 'OMSGallery/Security'
447-
promotionCode: ''
448-
}
449-
properties: {
450-
workspaceResourceId: logAnalyticsWorkspaceResourceId
451-
}
452-
}
453-
454436
// SFI: data collection rule that captures Windows Security audit success
455437
// (EventID 4624) and audit failure (EventID 4625) events from the jumpbox VM
456438
// and routes them to Log Analytics via the Microsoft-SecurityEvent stream.
439+
// The SecurityEvent table is auto-provisioned by Azure Monitor on first
440+
// ingestion via the DCR; no legacy OMSGallery/Security solution is needed.
457441
// (ADO #43311)
458442
var dataCollectionRulesResourceName = 'dcr-${solutionSuffix}'
459443
var dataCollectionRulesLocation = useExistingLogAnalytics
460444
? existingLogAnalyticsWorkspace!.location
461445
: logAnalyticsWorkspace!.outputs.location
462446
module windowsVmDataCollectionRules 'br/public:avm/res/insights/data-collection-rule:0.11.0' = if (enablePrivateNetworking && enableMonitoring) {
463447
name: take('avm.res.insights.data-collection-rule.${dataCollectionRulesResourceName}', 64)
464-
dependsOn: [securitySolution]
465448
params: {
466449
name: dataCollectionRulesResourceName
467450
tags: allTags

infra/main.json

Lines changed: 4 additions & 24 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": "1101835156356663285"
9+
"templateHash": "1952959724829141031"
1010
}
1111
},
1212
"parameters": {
@@ -348,25 +348,6 @@
348348
"tags": "[union(variables('existingTags'), parameters('tags'), createObject('TemplateName', 'Container Migration', 'Type', if(parameters('enablePrivateNetworking'), 'WAF', 'Non-WAF'), 'CreatedBy', variables('deployerIdentityName')))]"
349349
}
350350
},
351-
"securitySolution": {
352-
"condition": "[and(parameters('enablePrivateNetworking'), parameters('enableMonitoring'))]",
353-
"type": "Microsoft.OperationsManagement/solutions",
354-
"apiVersion": "2015-11-01-preview",
355-
"name": "[format('Security({0})', variables('logAnalyticsWorkspaceResourceName'))]",
356-
"location": "[variables('solutionLocation')]",
357-
"plan": {
358-
"name": "[format('Security({0})', variables('logAnalyticsWorkspaceResourceName'))]",
359-
"publisher": "Microsoft",
360-
"product": "OMSGallery/Security",
361-
"promotionCode": ""
362-
},
363-
"properties": {
364-
"workspaceResourceId": "[if(variables('useExistingLogAnalytics'), parameters('existingLogAnalyticsWorkspaceId'), reference('logAnalyticsWorkspace').outputs.resourceId.value)]"
365-
},
366-
"dependsOn": [
367-
"logAnalyticsWorkspace"
368-
]
369-
},
370351
"existingAiFoundryAiServices": {
371352
"condition": "[variables('useExistingAiFoundryAiProject')]",
372353
"existing": true,
@@ -18457,8 +18438,7 @@
1845718438
},
1845818439
"dependsOn": [
1845918440
"existingLogAnalyticsWorkspace",
18460-
"logAnalyticsWorkspace",
18461-
"securitySolution"
18441+
"logAnalyticsWorkspace"
1846218442
]
1846318443
},
1846418444
"avmPrivateDnsZones": {
@@ -27430,8 +27410,8 @@
2743027410
},
2743127411
"dependsOn": [
2743227412
"appIdentity",
27433-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageBlob)]",
2743427413
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageQueue)]",
27414+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageBlob)]",
2743527415
"virtualNetwork"
2743627416
]
2743727417
},
@@ -35154,8 +35134,8 @@
3515435134
"dependsOn": [
3515535135
"aiFoundryAiServices",
3515635136
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]",
35157-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]",
3515835137
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]",
35138+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]",
3515935139
"virtualNetwork"
3516035140
]
3516135141
},

infra/main_custom.bicep

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -411,35 +411,18 @@ module jumpboxVM 'br/public:avm/res/compute/virtual-machine:0.15.0' = if (enable
411411
}
412412
}
413413

414-
// SFI: install the Azure Monitor "Security" solution on the Log Analytics
415-
// workspace so that the Microsoft-SecurityEvent stream produced by the data
416-
// collection rule below populates the SecurityEvent table. Same gate as the
417-
// DCR. (ADO #43311)
418-
resource securitySolution 'Microsoft.OperationsManagement/solutions@2015-11-01-preview' = if (enablePrivateNetworking && enableMonitoring) {
419-
name: 'Security(${logAnalyticsWorkspaceResourceName})'
420-
location: solutionLocation
421-
plan: {
422-
name: 'Security(${logAnalyticsWorkspaceResourceName})'
423-
publisher: 'Microsoft'
424-
product: 'OMSGallery/Security'
425-
promotionCode: ''
426-
}
427-
properties: {
428-
workspaceResourceId: logAnalyticsWorkspaceResourceId
429-
}
430-
}
431-
432414
// SFI: data collection rule that captures Windows Security audit success
433415
// (EventID 4624) and audit failure (EventID 4625) events from the jumpbox VM
434416
// and routes them to Log Analytics via the Microsoft-SecurityEvent stream.
417+
// The SecurityEvent table is auto-provisioned by Azure Monitor on first
418+
// ingestion via the DCR; no legacy OMSGallery/Security solution is needed.
435419
// (ADO #43311)
436420
var dataCollectionRulesResourceName = 'dcr-${solutionSuffix}'
437421
var dataCollectionRulesLocation = useExistingLogAnalytics
438422
? existingLogAnalyticsWorkspace!.location
439423
: logAnalyticsWorkspace!.outputs.location
440424
module windowsVmDataCollectionRules 'br/public:avm/res/insights/data-collection-rule:0.11.0' = if (enablePrivateNetworking && enableMonitoring) {
441425
name: take('avm.res.insights.data-collection-rule.${dataCollectionRulesResourceName}', 64)
442-
dependsOn: [securitySolution]
443426
params: {
444427
name: dataCollectionRulesResourceName
445428
tags: allTags

0 commit comments

Comments
 (0)