Add Azure.Redis.MigrateAMR rule for Azure Cache for Redis migration#10
Add Azure.Redis.MigrateAMR rule for Azure Cache for Redis migration#10
Conversation
Co-authored-by: BenjaminEngeset <99641908+BenjaminEngeset@users.noreply.github.com>
Co-authored-by: BenjaminEngeset <99641908+BenjaminEngeset@users.noreply.github.com>
BenjaminEngeset
left a comment
There was a problem hiding this comment.
@copilot Look on my comments. Update the localized string as well and the test cases.
| ).Reason($LocalizedData.AzureCacheRedisVersion) | ||
| } | ||
|
|
||
| # Synopsis: Azure Cache for Redis is on the retirement path. Migrate to Azure Managed Redis. |
| } | ||
|
|
||
| # 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'; } { |
| 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. | ||
|
|
| ## 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. | ||
|
|
| - [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) |
Co-authored-by: BenjaminEngeset <99641908+BenjaminEngeset@users.noreply.github.com>
BenjaminEngeset
left a comment
There was a problem hiding this comment.
@copilot Some feedback from me.
| @@ -0,0 +1,43 @@ | |||
| --- | |||
| reviewed: 2025-11-22 | |||
| 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. | ||
|
|
There was a problem hiding this comment.
Azure Cache for Redis (Basic, Standard, Premium):
Creation blocked for new customers: April 1, 2026
Creation blocked for existing customers: October 1, 2026
Retirement Date: September 30, 2028
Instances will be disabled starting October 1, 2028
There was a problem hiding this comment.
Updated retirement timeline with correct dates in 7ac3e86
| ## 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. | ||
|
|
docs/changelog.md
Outdated
| - Check that replica locations are in allowed regions by @BernieWhite. | ||
| [#3441](https://github.com/Azure/PSRule.Rules.Azure/issues/3441) | ||
| - Azure Cache for Redis: | ||
| - Check for Azure Cache for Redis retirement path by @BenjaminEngeset. |
| } | ||
|
|
||
| # Synopsis: Azure Cache for Redis is being retired. Migrate to Azure Managed Redis. | ||
| Rule 'Azure.Redis.Retirement' -Ref 'AZR-000506' -Type 'Microsoft.Cache/redis' -Tag @{ release = 'GA'; ruleSet = '2025_12'; 'Azure.WAF/pillar' = 'Operational Excellence'; } { |
|
|
||
| ## LINKS | ||
|
|
||
| - [Infrastructure as code](https://learn.microsoft.com/azure/architecture/framework/devops/automation-infrastructure) |
Co-authored-by: BenjaminEngeset <99641908+BenjaminEngeset@users.noreply.github.com>
| Azure Cache for Redis (Basic, Standard, Premium): | ||
|
|
There was a problem hiding this comment.
@copilot Just this sentence alone does not make sense. Use the previous sentence you had here and try to improve further.
There was a problem hiding this comment.
Improved the sentence to "Azure Cache for Redis (Basic, Standard, Premium) will be retired according to the following timeline:" in 9db7937
| ResourceHasNoTags = "The resource does not have any tags. Expected tags: {0}." | ||
| ActiveSecurityAlerts = "There are {0} active security alerts of high or medium severity." | ||
| KeyValueShouldNotContainSecrets = "The key value '{0}' property should not contain secrets." | ||
| AzureCacheRedisRetirement = "Azure Cache for Redis is being retired. Migrate to Azure Managed Redis." |
docs/changelog.md
Outdated
| - Check that replica locations are in allowed regions by @BernieWhite. | ||
| [#3441](https://github.com/Azure/PSRule.Rules.Azure/issues/3441) | ||
| - Azure Cache for Redis: | ||
| - Check that Azure Cache for Redis is migrated to Azure Managed Redis by @BenjaminEngeset. |
There was a problem hiding this comment.
@copilot We have to write this a bit different. Write something about legacy cache instances getting informed about migration to Azure Managed Redis.
There was a problem hiding this comment.
Updated to "Check that legacy Azure Cache for Redis instances are migrated to Azure Managed Redis" in 9db7937
| - Creation blocked for new customers: April 1, 2026 | ||
| - Creation blocked for existing customers: October 1, 2026 | ||
| - Retirement Date: September 30, 2028 | ||
| - Instances will be disabled starting October 1, 2028 | ||
|
|
Co-authored-by: BenjaminEngeset <99641908+BenjaminEngeset@users.noreply.github.com>
| ResourceHasNoTags = "The resource does not have any tags. Expected tags: {0}." | ||
| ActiveSecurityAlerts = "There are {0} active security alerts of high or medium severity." | ||
| KeyValueShouldNotContainSecrets = "The key value '{0}' property should not contain secrets." | ||
| AzureCacheRedisMigrateAMR = "Azure Cache for Redis is being retired. Migrate to Azure Managed Redis." |
There was a problem hiding this comment.
| AzureCacheRedisMigrateAMR = "Azure Cache for Redis is being retired. Migrate to Azure Managed Redis." | |
| CacheRedisMigrateAMR = "Azure Cache for Redis is being retired. Migrate to Azure Managed Redis." |
Co-authored-by: BenjaminEngeset <99641908+BenjaminEngeset@users.noreply.github.com>
Creating rule for Azure Cache for Redis retirement path (issue Azure#3605)
Summary
Renamed localized string from
AzureCacheRedisMigrateAMRtoCacheRedisMigrateAMRto follow naming conventions.Completed Tasks:
Azure.Redis.MigrateAMRwith reference AZR-000506Original prompt
Created from VS Code via the GitHub Pull Request extension.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.