azure-quickstart-templates
azure-quickstart-templates copied to clipboard
Azure Cache for Redis template fails to deploy it diagnosticsEnabled is set to true.
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)
- Deploy https://github.com/Azure/azure-quickstart-templates/blob/master/quickstarts/microsoft.cache/redis-cache/main.bicep with
diagnosticsEnabled: true
- See the sub-deployment for "Diagnostic settings" fail