Skip to content

[Bug Report]: New Diagnostic settings do not support retention #3572

@chris-gibbs

Description

@chris-gibbs

Describe the bug

Receiving an error when trying to deploy a storage account with Diagnostic settings enabled.

I believe it may be related the timelines identified in
https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/migrate-to-azure-storage-lifecycle-policy

Will need a fix for storage account, blob, file, table and queue.

Currently I'm just commenting out but will most likely need further work to clean up old params no longer required.

var diagnosticsMetrics = [for metric in diagnosticMetricsToEnable: {
  category: metric
  timeGrain: null
  enabled: true
  // https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/migrate-to-azure-storage-lifecycle-policy
  //retentionPolicy: {
  //  enabled: true
  //  days: diagnosticLogsRetentionInDays
  //}
}]

To reproduce

Deploy storage with Diagnostic settings enabled

Code snippet

No response

Relevant log output

{
  "code": "BadRequest",
  "message": "Diagnostic settings does not support retention for new diagnostic settings."
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions