You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems many of the CARML modules enable Diagnostic Logging on the resources created. However, it seems this has changed and several resources won't create due to the retention policy setting. The error is:
Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="BadRequest" Message="Diagnostic settings does not support retention for new diagnostic settings."
I'm working around it by commenting out the retentionPolicy on various resources to get them to create.
I've commented out the retention policy on:
It seems many of the CARML modules enable Diagnostic Logging on the resources created. However, it seems this has changed and several resources won't create due to the retention policy setting. The error is:
Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="BadRequest" Message="Diagnostic settings does not support retention for new diagnostic settings."
I'm working around it by commenting out the retentionPolicy on various resources to get them to create.
I've commented out the retention policy on:
bicep\CARML\Microsoft.ContainerRegistry\registries\deploy.bicep
bicep\CARML\Microsoft.Network\applicationGateways\deploy.bicep
bicep\CARML\Microsoft.Network\azureFirewalls\deploy.bicep
bicep\CARML\Microsoft.Network\bastionHosts\deploy.bicep
bicep\CARML\Microsoft.Network\networkSecurityGroups\deploy.bicep
bicep\CARML\Microsoft.Network\virtualNetworks\deploy.bicep
var diagnosticsLogsSpecified = [for category in filter(diagnosticLogCategoriesToEnable, item => item != 'allLogs'): {
category: category
enabled: true
// retentionPolicy: {
// enabled: true
// days: diagnosticLogsRetentionInDays
// }
}]
var diagnosticsLogs = contains(diagnosticLogCategoriesToEnable, 'allLogs') ? [
{
categoryGroup: 'allLogs'
enabled: true
// retentionPolicy: {
// enabled: true
// days: diagnosticLogsRetentionInDays
// }
}
] : diagnosticsLogsSpecified
var diagnosticsMetrics = [for metric in diagnosticMetricsToEnable: {
category: metric
timeGrain: null
enabled: true
// retentionPolicy: {
// enabled: true
// days: diagnosticLogsRetentionInDays
// }
}]
The text was updated successfully, but these errors were encountered: