azure-quickstart-templates icon indicating copy to clipboard operation
azure-quickstart-templates copied to clipboard

Azure Cache for Redis template fails to deploy it diagnosticsEnabled is set to true.

Open tmacam opened this issue 1 year ago • 0 comments

microsoft.cache/redis-cache

Issue Details

Deploying Azure Cache for Redis template with diagnostics enable causes an error

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

This happens, it seems, because retention is tied to the enabling diagnostics:

https://github.com/Azure/azure-quickstart-templates/blob/999adb937339304e5a32ffdca98dd7ab3c9a677c/quickstarts/microsoft.cache/redis-cache/main.bicep#L75-L79

And retention itself was deprecated:

The Diagnostic Settings Storage Retention feature is being deprecated. To configure retention for logs and metrics use Azure Storage Lifecycle Management.

but this template wasn't updated to reflect that.

Repro steps (if necessary, delete otherwise)

  1. Deploy https://github.com/Azure/azure-quickstart-templates/blob/master/quickstarts/microsoft.cache/redis-cache/main.bicep with diagnosticsEnabled: true
  2. See the sub-deployment for "Diagnostic settings" fail

tmacam avatar Sep 15 '23 22:09 tmacam