Skip to content

Commit

Permalink
updates to activity logs (#959)
Browse files Browse the repository at this point in the history
* updates to activity logs

* GitHub Action: Build Bicep to JSON

---------

Co-authored-by: github-actions <[email protected]>
  • Loading branch information
Mike Dzikowski and github-actions authored Apr 3, 2024
1 parent fb5233b commit a4da32d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
13 changes: 3 additions & 10 deletions src/bicep/mlz.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "11949976318508029089"
"templateHash": "7783918794036563591"
}
},
"parameters": {
Expand Down Expand Up @@ -7355,7 +7355,7 @@
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "49100111797787087"
"templateHash": "13989055129357073540"
}
},
"parameters": {
Expand Down Expand Up @@ -7435,9 +7435,6 @@
"parameters": {
"logAnalyticsWorkspaceId": {
"value": "[parameters('logAnalyticsWorkspaceResourceId')]"
},
"supportedClouds": {
"value": "[parameters('supportedClouds')]"
}
},
"template": {
Expand All @@ -7447,20 +7444,16 @@
"_generator": {
"name": "bicep",
"version": "0.26.54.24096",
"templateHash": "14852926421482749735"
"templateHash": "2758250668679366524"
}
},
"parameters": {
"logAnalyticsWorkspaceId": {
"type": "string"
},
"supportedClouds": {
"type": "array"
}
},
"resources": [
{
"condition": "[contains(parameters('supportedClouds'), environment().name)]",
"type": "Microsoft.Insights/diagnosticSettings",
"apiVersion": "2017-05-01-preview",
"name": "[format('diag-activity-log-{0}', subscription().subscriptionId)]",
Expand Down
3 changes: 1 addition & 2 deletions src/bicep/modules/activity-log-diagnostic-settings.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ Licensed under the MIT License.
targetScope = 'subscription'

param logAnalyticsWorkspaceId string
param supportedClouds array

// Export Activity Log to LAW
resource diagnosticSetting 'Microsoft.Insights/diagnosticSettings@2017-05-01-preview' = if ( contains(supportedClouds, environment().name) ) {
resource diagnosticSetting 'Microsoft.Insights/diagnosticSettings@2017-05-01-preview' = {
name: 'diag-activity-log-${subscription().subscriptionId}'
properties: {
workspaceId: logAnalyticsWorkspaceId
Expand Down
1 change: 0 additions & 1 deletion src/bicep/modules/diagnostics.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ module activityLogDiagnosticSettings 'activity-log-diagnostic-settings.bicep' =
scope: subscription(network.subscriptionId)
params: {
logAnalyticsWorkspaceId: logAnalyticsWorkspaceResourceId
supportedClouds: supportedClouds
}
}]

Expand Down

0 comments on commit a4da32d

Please sign in to comment.