-
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
Conversation
Co-authored-by: BenjaminEngeset <[email protected]>
Co-authored-by: BenjaminEngeset <[email protected]>
BenjaminEngeset
left a comment
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 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. |
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 Azure Cache for Redis is being retired. Migrate to Azure Managed Redis.
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.
Updated to "Azure Cache for Redis is being retired. Migrate to Azure Managed Redis." in d072045
| } | ||
|
|
||
| # 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'; } { |
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 AZR-000506. AZR-000505 is already in another PR that is not merged yet.
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.
Changed reference number to AZR-000506 in d072045
|
|
||
| ## SYNOPSIS | ||
|
|
||
| Azure Cache for Redis is on the retirement path. Migrate to Azure Managed Redis. |
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 Change to the same as the one I said to use in the rule.
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.
Updated synopsis to match the rule in d072045
| 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. | ||
|
|
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 Remove this, this rule is targeted strictly against informing about the deprecation.
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.
Removed the advantages section in d072045
| ## 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. | ||
|
|
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 Remove this, lets keep it away from this rule as there is much more involved in a migration.
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.
Removed the EXAMPLES section in d072045
| - [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) |
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 Remove this line.
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.
Removed the Azure deployment reference link in d072045
| --- | ||
| severity: Important | ||
| pillar: Operational Excellence | ||
| category: Infrastructure provisioning |
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 OE:05 Infrastructure as code
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.
Updated category to "OE:05 Infrastructure as code" in d072045
Co-authored-by: BenjaminEngeset <[email protected]>
BenjaminEngeset
left a comment
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 Some feedback from me.
| @@ -0,0 +1,43 @@ | |||
| --- | |||
| reviewed: 2025-11-22 | |||
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 2025-11-23
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.
Updated reviewed date to 2025-11-23 in 7ac3e86
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. | ||
|
|
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 Remove this.
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.
Removed NOTES section in 7ac3e86
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. |
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
| } | ||
|
|
||
| # 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'; } { |
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 Azure.Redis.MigrateAMR instead for the rule. 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.
Renamed rule to Azure.Redis.MigrateAMR in 7ac3e86
|
|
||
| ## LINKS | ||
|
|
||
| - [Infrastructure as code](https://learn.microsoft.com/azure/architecture/framework/devops/automation-infrastructure) |
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 OE:05 Infrastructure as code
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.
Updated LINKS section with "OE:05 Infrastructure as code" prefix in 7ac3e86
Co-authored-by: BenjaminEngeset <[email protected]>
| Azure Cache for Redis (Basic, Standard, Premium): | ||
|
|
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 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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." |
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 Lets call the localized string AzureCacheRedisMigrateAMR
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.
Renamed localized string to AzureCacheRedisMigrateAMR in 9db7937
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 | ||
|
|
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 Add . after each sentence.
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.
Added periods after each timeline bullet point in 9db7937
Co-authored-by: BenjaminEngeset <[email protected]>
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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." |
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.
Renamed to CacheRedisMigrateAMR in 220006b
Co-authored-by: BenjaminEngeset <[email protected]>
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.