Skip to main content
XenonStack

DevOps

XenonStack Blog Azure Resource Manager (ARM): Templates, Bicep and IaC

and | Published | Updated

Azure Resource Manager (ARM): Templates, Bicep and IaC
13:50

Key takeaway

  • Azure Resource Manager for architects: ARM templates vs Bicep vs Terraform, current limits, deployment stacks and the Azure Blueprints retirement.

Azure Resource Manager (ARM) is the deployment and management layer for Azure: every request from the portal, CLI, PowerShell, SDKs or REST is authenticated, authorised and routed through it. Infrastructure as code (IaC) on Azure means describing resources in declarative files, ARM templates in JSON or Bicep files, and letting ARM build them in the right order. For the vendor-neutral view first, see our guide to what infrastructure as code is.

For a CTO or platform lead the decision today is less "ARM or not" and more "which authoring language, and which controls around it". Microsoft now recommends Bicep for new work, Azure Blueprints is retiring on 31 January 2027, and deployment stacks are the recommended replacement. Compare with our posts on IaC on AWS and IaC on Google Cloud.

What is Azure Resource Manager and how does it work?

Resource Manager receives each request, authenticates and authorises it, then forwards it to the right Azure service. Because all requests pass through the same API, results and capabilities are consistent across tools. Azure RBAC is built into this layer, and you can apply tags, locks and policy to what is deployed (Microsoft Learn: What is Azure Resource Manager?).

How do scopes and resource groups work?

Azure has four management scopes: management groups, subscriptions, resource groups and resources. Settings applied at a higher scope, such as an Azure Policy assignment on a subscription, are inherited by the levels below. A resource group is a container for resources that share a lifecycle; each resource lives in exactly one group, and deleting the group deletes its resources. Templates can be deployed to tenants, management groups, subscriptions or resource groups.

The resource group also stores metadata about its resources, in the group's location. Microsoft recommends placing the group and its resources in the same region, so that a regional problem does not leave you unable to update resources whose metadata is unavailable.

Which IaC option fits Azure: ARM templates, Bicep or Terraform?

All three are declarative and can be run from a pipeline. They differ in authoring experience, state handling and how far they reach beyond Azure.

Two-column diagram mapping estates (existing JSON, new Azure-only, multi-cloud, retiring Blueprints) to ARM templates, Bicep, Terraform, and deployment stacks with template specs.
OptionWhat it isWhen it fitsCurrent status
ARM templates (JSON)The native Azure format. A JSON file of parameters, variables, resources and outputs (Microsoft Learn)Existing estates, tooling that emits JSON, exported templatesSupported. Microsoft recommends looking at Bicep for new work
BicepA declarative language that the Bicep CLI converts to ARM JSON at deployment (Microsoft Learn)Azure-only estates that want shorter, typed files and no state fileFree and open source; supports all resource types and API versions
TerraformHashiCorp tool with a write, plan, apply workflow and a state file (HashiCorp); see our Terraform guideMulti-cloud or hybrid estates that want one workflow across providersThird-party; works through providers such as the Azure provider

Our rule of thumb: choose Bicep for Azure-only platforms, keep ARM JSON where it already works, and choose Terraform when one team runs several clouds. Our overview of infrastructure as code tools compares the wider field.

What does an ARM template contain, and what are its limits?

A template has parameters, variables, user-defined functions, resources and outputs. Its syntax is declarative: you state the end state and Resource Manager works out the order, running independent deployments in parallel where it can. Deploying the same template repeatedly produces the same resources in the same state (idempotence). Built-in validation runs before deployment starts, so a deployment is less likely to stop half finished.

Several limits in our earlier version of this post have changed. The current figures from the ARM template best practices page are below.

LimitCurrent value (Microsoft Learn)
Template size4 MB, and each resource definition 1 MB (after expansion of loops, variables and parameters)
Parameter file4 MB
Parameters256
Variables512
Resources (including copy count)800
Output values64
Unique locations per subscription, tenant or management group scope10
Characters in a template expression24,576

Some limits can be exceeded with nested templates. Plan for this early in large estates, and split templates by lifecycle rather than by size alone.

What has changed in Azure IaC?

ChangeWhat it meansSource
Bicep is the recommended authoring languageMicrosoft describes Bicep as offering the same capabilities as ARM templates with simpler syntax; each Bicep file is converted to an ARM template during deploymentARM templates overview
Azure Blueprints (Preview) is retiringNew definitions stopped on 31 July 2026; existing definitions cannot be modified from 31 October 2026; assignments cannot be modified from 31 December 2026; retired 31 January 2027. Unexported definitions and assignments are deleted; deployed resources remainBlueprints retirement
Deployment stacks replace blueprint assignmentsStacks manage a set of resources as one unit, with delete or detach behaviour and deny settings. Template specs take over the storing and versioning roleChoose a replacement
What-if previews changesShows what will be created, updated or deleted before you deploy, without you managing stateARM templates overview

How do you govern and secure Azure deployments as code?

ControlWhat it doesWhere it fits
Azure RBACAccess control is native to the management layer, so it applies to every tool and APIWho can deploy, and at which scope
Azure PolicyA policy as code framework; non-compliant resources are remediated when deployed through templatesGuardrails at subscription or management group scope
TagsOrganise resources and show billing for groups of resources that share a tagCost allocation and ownership
Secure parametersUse securestring or secureObject for secrets; do not give them default values; values cannot be read after deploymentKeeping secrets out of repositories and deployment history
Template specsStore and version a template in Azure; users with read access can deploy it but not change it (Microsoft Learn)Approved patterns shared across teams
Deployment stacksDeny settings (DenyDelete or DenyWriteAndDelete) block unwanted changes to managed resources; they apply to the control plane only (Microsoft Learn)Protecting production from manual drift
ARM template test toolkitA PowerShell script that checks a template against recommended practicesA gate in the CI pipeline

Two details matter in practice. First, deny settings do not cover implicitly created resources, such as the virtual machines behind a managed AKS cluster. Second, a stack can exclude at most five principals from deny settings, so use Microsoft Entra groups for CI/CD identities and break-glass administrators.

AI agents that propose or apply infrastructure changes raise the same question as people do: what is this identity allowed to change, and where is the evidence? We see teams start to ask for agents that draft IaC and remediate drift. Such agents should deploy through the same pipeline, scope and deny settings. For the policy and audit side, Elixir Govern (formerly AgentGRC) keeps autonomous agent actions inside policy, with the audit trail risk teams need, and ElixirData Context OS keeps governed context, versioned policy and decision traces in one decision layer above AI agents. For building and orchestrating the agents themselves, see ElixirClaw, an agentic OS platform to build, orchestrate and govern AI agents and automation workflows while keeping humans in control. XenonStack builds ElixirClaw, ElixirData and these agents. Our policy as code guide covers the wider pattern.

How should you adopt ARM and Bicep step by step?

  1. Decide scopes first: management groups, subscriptions and resource groups that match ownership and lifecycle.
  2. Pick the authoring language per estate (Bicep for new Azure-only work; keep JSON where it is stable).
  3. Put every template in source control and deploy only through a pipeline; see our guide to the Azure DevOps pipeline.
  4. Add what-if and the test toolkit as pipeline gates; pin the API version once a template works as expected.
  5. Publish approved patterns as template specs and assign Azure Policy at management group scope.
  6. Move production to deployment stacks with deny settings; plan blueprint exports and migration before 31 January 2027.

What are the trade-offs, and when should you not use ARM templates?

JSON ARM templates are verbose and need complicated expressions; Bicep reduces this, but it is Azure-only. Terraform gives one workflow across clouds, but you must protect and manage its state file. Large templates hit the limits above and need modular design. Using a parameter for the API version is discouraged, because IntelliSense cannot determine the schema and a mismatched value fails the deployment. Do not use ARM or Bicep as your only IaC tool if the estate spans several clouds or on-premises systems; choose Terraform or a similar tool there.

To map one infrastructure decision your agents should make, and the context and policy it depends on, book a Context Workshop. See what happens in the workshop.

FAQ: Azure Resource Manager and IaC

What is Azure Resource Manager?

Azure Resource Manager is the deployment and management service for Azure. It authenticates and authorises every request from the portal, CLI, PowerShell, SDKs and REST, then forwards it to the right service, so results are consistent across tools.

Are ARM templates being retired?

The Microsoft pages we read describe ARM templates as supported and recommend looking at Bicep for new work. Azure Blueprints, a separate service, is retiring on 31 January 2027.

Should I use ARM templates, Bicep or Terraform on Azure?

Use Bicep for Azure-only estates, keep ARM JSON where it already works, and use Terraform when one workflow must span several clouds. Bicep has no state file to manage; Terraform keeps state.

What replaces Azure Blueprints?

Microsoft recommends deployment stacks for grouping, lifecycle management and deny enforcement, with template specs or a Git repository for storing and versioning templates.

What are the main ARM template limits?

Templates are limited to 4 MB and each resource definition to 1 MB, with 256 parameters, 512 variables, 800 resources, 64 outputs and 24,576 characters in an expression. Nested templates can exceed some limits.

How do I stop manual changes to deployed resources?

Deploy through a deployment stack with deny settings. DenyDelete blocks deletes and DenyWriteAndDelete blocks updates and deletes, for explicitly managed resources at the control plane only.

Related reading

Sources: Microsoft Learn pages on Azure Resource Manager, ARM templates, ARM template best practices, Bicep, template specs, deployment stacks and Azure Blueprints retirement; HashiCorp Terraform introduction. All read 12 November 2026.

Follow XenonStack on LinkedIn: XenonStack on LinkedIn for new guides on agentic AI, data and platform engineering.

Table of Contents

navdeep-singh-gill

Navdeep Singh Gill

Global CEO and Founder of XenonStack

LinkedIn profile

Navdeep Singh Gill is serving as Chief Executive Officer and Product Architect at XenonStack. He holds expertise in building SaaS Platform for Decentralised Big Data management and Governance, AI Marketplace for Operationalising and Scaling. His incredible experience in AI Technologies and Big Data Engineering thrills him to write about different use cases and its approach to solutions.

Get the latest articles in your inbox

Subscribe Now

Interested in solving your challenges with the XenonStack team?
Get Started

Tell us about you and your priorities so we can prepare the right conversation. It takes about 2 minutes.

Please Select your Industry
Banking
Fintech
Payment Providers
Wealth Management
Discrete Manufacturing
Semiconductor
Machinery Manufacturing / Automation
Appliances / Electrical / Electronics
Elevator Manufacturing
Defense & Space Manufacturing
Computers & Electronics / Industrial Machinery
Motor Vehicle Manufacturing
Food and Beverages
Distillery & Wines
Beverages
Shipping
Logistics
Mobility (EV / Public Transport)
Energy & Utilities
Hospitality
Digital Gaming Platforms
SportsTech with AI
Public Safety - Explosives
Public Safety - Firefighting
Public Safety - Surveillance
Public Safety - Others
Media Platforms
City Operations
Airlines & Aviation
Defense Warfare & Drones
Robotics Engineering
Drones Manufacturing
AI Labs for Colleges
AI MSP / Quantum / AGI Institutes
Retail Apparel and Fashion

Continue