mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-17 20:38:06 +00:00
Remove the retention policy setting (#3452)
* Remove the configuration of the autoscale diagnostic * only remove the retention policy * set retention policy to false * remove settings * remove retentionPolicy from bicep * format
This commit is contained in:
@ -263,8 +263,8 @@ public class AutoScaleOperations : Orm<AutoScale>, IAutoScaleOperations {
|
|||||||
// The field is there in github though, so need to update this code once that code is released:
|
// The field is there in github though, so need to update this code once that code is released:
|
||||||
// https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/Models/LogSettings.cs
|
// https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/Models/LogSettings.cs
|
||||||
// But setting logs one by one works the same as "allLogs" being set...
|
// But setting logs one by one works the same as "allLogs" being set...
|
||||||
var logSettings1 = new LogSettings(true) { RetentionPolicy = new RetentionPolicy(true, 30), Category = "AutoscaleEvaluations" };
|
var logSettings1 = new LogSettings(true) { Category = "AutoscaleEvaluations" };
|
||||||
var logSettings2 = new LogSettings(true) { RetentionPolicy = new RetentionPolicy(true, 30), Category = "AutoscaleScaleActions" };
|
var logSettings2 = new LogSettings(true) { Category = "AutoscaleScaleActions" };
|
||||||
|
|
||||||
var parameters = new DiagnosticSettingsData {
|
var parameters = new DiagnosticSettingsData {
|
||||||
WorkspaceId = logAnalyticsWorkspaceId
|
WorkspaceId = logAnalyticsWorkspaceId
|
||||||
|
@ -167,7 +167,6 @@ module autoscaleSettings 'bicep-templates/autoscale-settings.bicep' = {
|
|||||||
server_farm_id: serverFarm.outputs.id
|
server_farm_id: serverFarm.outputs.id
|
||||||
owner: owner
|
owner: owner
|
||||||
workspaceId: operationalInsights.outputs.workspaceId
|
workspaceId: operationalInsights.outputs.workspaceId
|
||||||
logRetention: log_retention
|
|
||||||
autoscale_name: 'onefuzz-autoscale-${uniqueString(resourceGroup().id)}'
|
autoscale_name: 'onefuzz-autoscale-${uniqueString(resourceGroup().id)}'
|
||||||
function_diagnostics_settings_name: 'functionDiagnosticSettings'
|
function_diagnostics_settings_name: 'functionDiagnosticSettings'
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@ param location string
|
|||||||
param server_farm_id string
|
param server_farm_id string
|
||||||
param owner string
|
param owner string
|
||||||
param workspaceId string
|
param workspaceId string
|
||||||
param logRetention int
|
|
||||||
param autoscale_name string
|
param autoscale_name string
|
||||||
param function_diagnostics_settings_name string
|
param function_diagnostics_settings_name string
|
||||||
|
|
||||||
@ -79,10 +78,6 @@ resource functionDiagnosticSettings 'Microsoft.Insights/diagnosticSettings@2021-
|
|||||||
{
|
{
|
||||||
categoryGroup: 'allLogs'
|
categoryGroup: 'allLogs'
|
||||||
enabled: true
|
enabled: true
|
||||||
retentionPolicy: {
|
|
||||||
days: logRetention
|
|
||||||
enabled: true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
workspaceId: workspaceId
|
workspaceId: workspaceId
|
||||||
|
Reference in New Issue
Block a user