Loading ARM to Terraform Converter...
How to Convert Azure ARM Templates to Terraform
Input Your Azure ARM Template
Start by providing your Azure Resource Manager template. Whether you're migrating from ARM to Terraform or modernizing your Azure Infrastructure as Code:
.json or .template fileAutomatic Conversion Process
The converter reads your template and writes Terraform HCL using the azurerm provider:
parameters() becomes var., variables() becomes local., and resourceId(), concat() and format() are rewritten where they can be; other expressions are kept as textReview Generated Terraform Code
Review the generated main.tf configuration. Treat it as a first draft and check these points before you run it:
resource_group_name where the resource needs it[parameters('location')] becomes var.location, and a default of [resourceGroup().location] becomes a variable you set when you run TerraformDownload and Deploy with Terraform
Deploy your Azure infrastructure with Terraform:
main.tf to your project directoryterraform init to download the azurerm provideraz login to authenticate with Azureterraform apply to provision Azure resourcesFrequently Asked Questions
Which Azure resource types become Terraform resources?
A fixed list of 29 common types, including virtual machines and scale sets, managed disks, storage accounts and blob containers, virtual networks, network interfaces, public IPs, network security groups, load balancers, application gateways, App Service plans and sites, SQL, PostgreSQL and MySQL servers, Cosmos DB, AKS, container registries and container groups, Application Insights, Log Analytics, managed identities, Key Vault and resource groups. Any other type is skipped, and a note at the top of the output names it.
Are the resource properties matched to the azurerm arguments?
No. Every key from properties, plus sku, kind and similar top-level keys, is copied into the resource block with its name in snake_case, so addressSpace becomes address_space. The azurerm provider often uses different names and nested blocks, and most resources also need resource_group_name, so expect to rename and reshape some of them. terraform validate shows you which ones.
Which ARM template functions are translated?
parameters('x') becomes var.x, variables('x') becomes local.x, resourceGroup().location and resourceGroup().name become variables you set, and resourceId() pointing at a resource in the same template becomes a reference like azurerm_virtual_network.main.id. concat() and format() with text in them become string interpolation, and toLower, toUpper and length become lower, upper and length. Anything else, such as reference(), uniqueString() or if(), is kept as quoted text and listed in a note so you can replace it by hand.
What happens to dependsOn, conditions and copy loops?
dependsOn entries that point at a resource in the template become depends_on references. Conditions, copy loops and child resources nested inside another resource are not converted; they are left as comments in the output so you can rewrite them with count or for_each.
Will long IDs, prices or text with quotes change?
No. Numbers are written with the digits you typed, so 8901240544102066246 and 14.50 come out exactly as they were, and the string "00501" stays a string. Quotes, backslashes and line breaks are escaped, and a literal ${ or %{ is written as $${ or %%{ so Terraform does not try to interpolate it.
Is my ARM template uploaded anywhere?
No. The conversion runs in your browser, nothing is sent to a server and nothing is kept, so a reload starts with an empty editor.
What about Azure Bicep files?
Compile the Bicep file to an ARM template first with az bicep build, then paste the resulting JSON here.
Related Tools
CloudFormation to Terraform
Convert AWS CloudFormation templates to Terraform HCL configuration
Terraform to CloudFormation
Convert Terraform HCL configurations to AWS CloudFormation templates in YAML or JSON
Ansible to Terraform
Convert Ansible playbooks to Terraform HCL for AWS, Azure, and GCP resources
ARM to Bicep
Convert Azure Resource Manager (ARM) templates to Bicep with modern syntax and improved readability
Bicep to ARM
Convert Bicep files to Azure Resource Manager (ARM) JSON templates for deployment and tooling compatibility
CloudFormation to Pulumi
Convert AWS CloudFormation templates to Pulumi TypeScript for modern infrastructure as code