How to Move Azure Templates From ARM to Bicep

Elliott Leighton-Woodruff, Principle Architecture at Synextra
Article by:
Elliott Leighton-Woodruff
Principal Architect
Azure templates ARM to Bicep

Suppose you’ve ever inherited an Azure estate. In that case, you know the deal a graveyard of JSON ARM templates, each one slightly different, nobody quite sure what’s actively deployed and just enough quirks to keep you guessing.

Maybe you’ve come into the business with the Bicep skill, ready to take the company by storm, or perhaps you’ve noticed that ARM doesn’t seem to be getting the love it deserves but Bicep is and you feel like you’re missing out! So, what does it take to drag that spaghetti mess into Bicep without breaking production or losing your sanity?

ARM vs Bicep?

  • Readability: Bicep is clean, concise, and (almost) readable by actual humans. ARM JSON templates? Not so much.
  • Reusability: Modules and parameter files are dead simple in Bicep. No more copy-paste purgatory.
  • Refactoring: No more hours staring at blocks of code wondering what they even do.
  • Azure support: New features land in Bicep first. ARM catches up… eventually.
  • Longevity: ARM’s not officially dead, but let’s be honest. Bicep’s the future.

Preparation for moving from ARM to Bicep

  • Audit: List every template actually in use half of them are probably out of date, unused or specific to old projects. Start by binning them.
  • Set up source control: If it’s not already in Git, get it there. You want to track every change, before and after migration.
  • Automated conversion: Fire up the Azure Bicep CLI (bicep decompile) and convert your ARM JSON to Bicep. Don’t expect magic, it’s not going to work first time everytime.

Bicep ‘decompiling’

This requires Bicep installed either locally or on your agent, you can find the steps for various methods here: Install Bicep tools – Azure Resource Manager | Microsoft Learn

1. Run the decompiler

Once installed, open a terminal where your ARM JSON lives and run:

az bicep decompile --file mytemplate.json

This gives you a .bicep file with most of the resources mapped across. Review the output carefully, because the tooling still can’t untangle every parameterisation or nested resource.

2. Untangle and refactor

  • Remove dead parameters: ARM is parameter-happy. Bicep simplifies this, so drop anything unused.
  • Modularise: Break up massive templates into sensible, reusable Bicep modules (think: networking, compute, storage).
  • Rename and Document: ARM resource names are often…garbage. Use this as a chance to bring clear, descriptive naming and decent comments.

3. Validate with What-If

Use Azure’s what-if deployment feature to ensure the converted Bicep will not destroy your platform:

az deployment sub what-if --template-file main.bicep

Catch resource drift or accidental removals before you hit apply, not after.

4. Pipeline-ready

  • Add linting: Drop Bicep linter into your pipeline (it’ll catch style and basic errors).
  • Automate deployments: Bicep slides right into Azure DevOps or GitHub Actions. Set up CI/CD so no one merges broken code.
  • Stage rollouts: Deploy Bicep to a test subscription/management group before taking a swing at prod.

The gotchas

  • Some complex ARM features (like a few loops or deeply nested resources) need manual rework in Bicep.
  • Permissions, resource locks, and RBAC ideally live outside your Bicep if possible, the migration is a great time to fix this.
  • Tag everything. Even with Bicep’s clean syntax, untangling dozens of old resources later is never fun.

Migrating from ARM to Bicep isn’t instant, but it’s worth the effort every time you need to make changes, explain your infra, or onboard new bodies. Cleaner code, faster deployments, less “what on earth does this do?”

Subscribe to our newsletter

Stay ahead of the curve with the latest trends, tips, and insights in cloud computing

thank you for contacting us image
Thanks, we'll be in touch.
Go back
By sending this message you agree to our terms and conditions.