-
Notifications
You must be signed in to change notification settings - Fork 0
Add Azure.Redis.MigrateAMR rule for Azure Cache for Redis migration #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
1bf98e1
9fb095f
1dbd2b1
d072045
7ac3e86
9db7937
277a291
6f304b8
220006b
49a8b6c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,105 @@ | ||
| --- | ||
| severity: Important | ||
| pillar: Operational Excellence | ||
| category: Infrastructure provisioning | ||
|
||
| resource: Azure Cache for Redis | ||
| resourceType: Microsoft.Cache/redis | ||
| online version: https://azure.github.io/PSRule.Rules.Azure/en/rules/Azure.Redis.Retirement/ | ||
| --- | ||
|
|
||
| # Migrate to Azure Managed Redis | ||
|
|
||
| ## SYNOPSIS | ||
|
|
||
| Azure Cache for Redis is on the retirement path. Migrate to Azure Managed Redis. | ||
|
||
|
|
||
| ## DESCRIPTION | ||
|
|
||
| Microsoft has announced the retirement timeline for Azure Cache for Redis across all SKUs. | ||
| The recommended replacement going forward is Azure Managed Redis. | ||
|
|
||
| Azure Cache for Redis will be retired according to the following timeline: | ||
|
|
||
| - Basic and Standard SKUs will be retired on September 30, 2025. | ||
| - Premium SKU will be retired on September 30, 2027. | ||
|
|
||
|
||
| To avoid service disruption, migrate your workloads to Azure Managed Redis. | ||
|
|
||
| Azure Managed Redis provides several advantages: | ||
|
|
||
| - **Improved Performance**: Enhanced throughput and lower latency. | ||
| - **Enhanced Security**: Built-in support for Azure Active Directory authentication and managed identities. | ||
| - **Better Availability**: Higher availability SLA and improved zone redundancy support. | ||
| - **Simplified Management**: Streamlined configuration and maintenance with automated updates. | ||
| - **Cost Optimization**: More predictable pricing and better resource utilization. | ||
|
|
||
|
||
| ## RECOMMENDATION | ||
|
|
||
| Plan and execute migration from Azure Cache for Redis to Azure Managed Redis before the retirement dates to avoid service disruption. | ||
|
|
||
| ## EXAMPLES | ||
|
|
||
| ### Configure with Azure template | ||
|
|
||
| Azure Managed Redis uses a different resource type. Update your templates to use `Microsoft.Cache/redisEnterprise` instead of `Microsoft.Cache/Redis`. | ||
|
|
||
| For example: | ||
|
|
||
| ```json | ||
| { | ||
| "type": "Microsoft.Cache/redisEnterprise", | ||
| "apiVersion": "2023-11-01", | ||
| "name": "[parameters('redisCacheName')]", | ||
| "location": "[parameters('location')]", | ||
| "sku": { | ||
| "name": "Enterprise_E10", | ||
| "capacity": 2 | ||
| }, | ||
| "zones": [ | ||
| "1", | ||
| "2", | ||
| "3" | ||
| ], | ||
| "properties": { | ||
| "minimumTlsVersion": "1.2" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ### Configure with Bicep | ||
|
|
||
| Azure Managed Redis uses a different resource type. Update your Bicep files to use `Microsoft.Cache/redisEnterprise` instead of `Microsoft.Cache/Redis`. | ||
|
|
||
| For example: | ||
|
|
||
| ```bicep | ||
| resource redisEnterprise 'Microsoft.Cache/redisEnterprise@2023-11-01' = { | ||
| name: redisCacheName | ||
| location: location | ||
| sku: { | ||
| name: 'Enterprise_E10' | ||
| capacity: 2 | ||
| } | ||
| zones: [ | ||
| '1' | ||
| '2' | ||
| '3' | ||
| ] | ||
| properties: { | ||
| minimumTlsVersion: '1.2' | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ## NOTES | ||
|
|
||
| This rule will fail for all Azure Cache for Redis resources as part of informing you about the retirement path. | ||
| Consider migrating to Azure Managed Redis before the retirement dates. | ||
|
|
||
|
||
| ## LINKS | ||
|
|
||
| - [Infrastructure provisioning](https://learn.microsoft.com/azure/architecture/framework/devops/automation-infrastructure) | ||
| - [Azure Cache for Redis retirement: What to know and how to prepare](https://techcommunity.microsoft.com/blog/azure-managed-redis/azure-cache-for-redis-retirement-what-to-know-and-how-to-prepare/4458721) | ||
| - [Azure Cache for Redis retirement FAQ](https://learn.microsoft.com/azure/azure-cache-for-redis/retirement-faq) | ||
| - [Azure Managed Redis documentation](https://learn.microsoft.com/azure/azure-cache-for-redis/managed-redis/managed-redis-overview) | ||
| - [Azure deployment reference](https://learn.microsoft.com/azure/templates/microsoft.cache/redisenterprise) | ||
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -123,6 +123,11 @@ Rule 'Azure.Redis.Version' -Ref 'AZR-000347' -Type 'Microsoft.Cache/redis' -Tag | |
| ).Reason($LocalizedData.AzureCacheRedisVersion) | ||
| } | ||
|
|
||
| # Synopsis: Azure Cache for Redis is on the retirement path. Migrate to Azure Managed Redis. | ||
|
||
| Rule 'Azure.Redis.Retirement' -Ref 'AZR-000505' -Type 'Microsoft.Cache/redis' -Tag @{ release = 'GA'; ruleSet = '2025_12'; 'Azure.WAF/pillar' = 'Operational Excellence'; } { | ||
|
||
| $Assert.Fail($LocalizedData.AzureCacheRedisRetirement) | ||
| } | ||
|
|
||
| #region Helper functions | ||
|
|
||
| function global:GetCacheMemory { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot This was a hard sentence to read, try to write something that makes more sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarified changelog entry to "Check that Azure Cache for Redis is migrated to Azure Managed Redis" in 7ac3e86