Skip to content

feat: add IaC conversion workflow for ACR to AMR migration#3

Open
suryaren wants to merge 1 commit intoAzureManagedRedis:mainfrom
suryaren:users/suryar/iac-workflow
Open

feat: add IaC conversion workflow for ACR to AMR migration#3
suryaren wants to merge 1 commit intoAzureManagedRedis:mainfrom
suryaren:users/suryar/iac-workflow

Conversation

@suryaren
Copy link

@suryaren suryaren commented Mar 16, 2026

Summary

Adds a complete Infrastructure-as-Code conversion workflow for migrating Azure Cache for Redis (ACR) ARM/Bicep templates to Azure Managed Redis (AMR).

Changes

  • Core converter (Convert-AcrToAmr.ps1): Parses ACR ARM/Bicep templates and produces equivalent AMR templates with correct SKU mapping, clustering, persistence, networking, identity, and diagnostics
  • E2E test runner: Parallel ARM + Bicep E2E testing with WhatIf and real deploy validation
  • Shared helpers and validation script (Validate-Migration.ps1)
  • Template fixtures: Split by tier (Basic, Standard, Premium) for both ARM and Bicep

Test Results

  • Unit tests: 239/239 passing
  • WhatIf E2E: ARM 13/13 ✅, Bicep 13/13
  • Real Deploy E2E: 5/13 ARM, 13/13 Bicep — deploy failures are Azure platform capacity issues in westus2, not code bugs (all 13 migrations + WhatIf validations pass)

Add complete Infrastructure-as-Code conversion workflow for migrating
Azure Cache for Redis (ACR) ARM/Bicep templates to Azure Managed Redis (AMR).

- Core converter (Convert-AcrToAmr.ps1) with SKU mapping, clustering,
  persistence, networking, identity, and diagnostics support
- E2E test runner with parallel ARM + Bicep WhatIf and real deploy validation
- Shared helpers and validation script (Validate-Migration.ps1)
- Template fixtures split by tier (Basic, Standard, Premium)
- Private endpoint subnet.id fix with condition guard
- RDB/AOF persistence parsing fallback for unresolvable redisConfiguration
- Managed identity-based persistence support

Test results: 239/239 unit tests, 13/13 WhatIf E2E (ARM + Bicep),
13/13 Bicep real deploy, 10/13 ARM real deploy (3 infra gaps, not code bugs)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@suryaren suryaren force-pushed the users/suryar/iac-workflow branch from 3a91fcf to 66d863e Compare March 16, 2026 18:27
[ordered]@{
name = "redisEnterprise"
properties = [ordered]@{
privateLinkServiceId = $DependsOnId.Replace("[resourceId(", "[resourceId(").Replace(")]", ")]")
Copy link
Contributor

Choose a reason for hiding this comment

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

this seems to be replacing a string with the same one? Is it needed?

# Can't resolve — return the reference as-is
return $Value
}
# Handle complex ARM expressions containing parameters('x') — e.g., [if(greater(parameters('shardCount'), 0), ...)]
Copy link
Contributor

Choose a reason for hiding this comment

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

For expressions like [if(greater(parameters('shardCount'), 0), ...)], this returns the raw parameter value, not the expression result. Consider emitting a Write-Warning when this fallback triggers so users know to install PSRule for full resolution.

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.

2 participants