Skip to content

Conversation

Copy link

Copilot AI commented Nov 22, 2025

Creating rule for Azure Cache for Redis retirement path (issue Azure#3605)

Summary

Renamed localized string from AzureCacheRedisMigrateAMR to CacheRedisMigrateAMR to follow naming conventions.

Completed Tasks:

  • Create new rule Azure.Redis.MigrateAMR with reference AZR-000506
  • Add rule to PowerShell rules file (Azure.Redis.Rule.ps1)
  • Add localized message for the rule with proper naming (CacheRedisMigrateAMR)
  • Create documentation file (Azure.Redis.MigrateAMR.md)
  • Add test cases to validate the rule (all 18 Redis tests passing)
  • Update the changelog with clearer description about legacy instances
  • Build and test the changes
  • Address all review feedback
  • Final verification
Original prompt

Create rule for Azure#3605

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.

Copilot AI and others added 2 commits November 22, 2025 17:30
Copilot AI changed the title [WIP] Create rule for issue #3605 Add Azure.Redis.Retirement rule for retirement notification Nov 22, 2025
Copy link
Owner

@BenjaminEngeset BenjaminEngeset left a 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.
Copy link
Owner

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.

Copy link
Author

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'; } {
Copy link
Owner

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.

Copy link
Author

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.
Copy link
Owner

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.

Copy link
Author

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

Comment on lines 28 to 35
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.

Copy link
Owner

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.

Copy link
Author

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

Comment on lines 40 to 98
## 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.

Copy link
Owner

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.

Copy link
Author

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)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Remove this line.

Copy link
Author

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
Copy link
Owner

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

Copy link
Author

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

Copy link
Author

Copilot AI commented Nov 22, 2025

@copilot Look on my comments. Update the localized string as well and the test cases.

Updated localized string to "Azure Cache for Redis is being retired. Migrate to Azure Managed Redis." and updated test cases to verify the new message in d072045

Copy link
Owner

@BenjaminEngeset BenjaminEngeset left a 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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot 2025-11-23

Copy link
Author

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

Comment on lines 22 to 26
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.

Copy link
Owner

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 (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

Copy link
Author

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

Comment on lines 33 to 37
## 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.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Remove this.

Copy link
Author

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

- 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.
Copy link
Owner

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.

Copy link
Author

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'; } {
Copy link
Owner

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.

Copy link
Author

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)
Copy link
Owner

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

Copy link
Author

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

Copilot AI changed the title Add Azure.Redis.Retirement rule for retirement notification Add Azure.Redis.MigrateAMR rule for Azure Cache for Redis migration Nov 23, 2025
Comment on lines 22 to 23
Azure Cache for Redis (Basic, Standard, Premium):

Copy link
Owner

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.

Copy link
Author

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."
Copy link
Owner

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

Copy link
Author

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

- 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.
Copy link
Owner

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.

Copy link
Author

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

Comment on lines 24 to 28
- 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

Copy link
Owner

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.

Copy link
Author

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

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."
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot

Suggested change
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."

Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants