Loading Bicep to Terraform Converter...
How to Convert Bicep to Terraform - Step by Step Guide
Paste Your Bicep Code
Copy your Azure Bicep code into the left editor. The converter reads params, vars, resources, modules and outputs, including nested child resources, decorators and multi-line strings.
Review the Terraform HCL Output
Known Bicep resource types are written as Terraform azurerm provider resources. Params become variables, vars become locals and outputs stay outputs. The # Note lines at the top of the output list anything that was skipped or kept as quoted text.
Download or Copy Terraform Configuration
Export the Terraform HCL. It starts with the azurerm provider blocks and is meant as a first draft: property names are copied in snake_case and still need to be checked against the azurerm arguments.
Initialize and Plan with Terraform
Run Terraform CLI commands against your Azure subscription. If you have an ARM template instead of a Bicep file, the ARM to Terraform converter takes the JSON directly.
terraform init to download the providerterraform validate and terraform plan to see what still needs fixingterraform apply only after you have reviewed the planFrequently Asked Questions
What does the converter turn into Terraform?
Each param becomes a variable block with its type, default and description; @secure() adds sensitive = true, and @allowed, @minValue, @maxValue, @minLength and @maxLength become validation blocks. Each var goes into a locals block, outputs become output blocks, and modules become module blocks that point at the same path without the .bicep ending. Resources of a known Azure type become azurerm resource blocks, and resources marked existing become data blocks.
Which Azure resource types are mapped?
A fixed list of about 35 common types, such as storage accounts and blob containers, virtual networks and subnets, network interfaces, public IPs, network security groups, virtual machines, App Service plans and sites, SQL servers and databases, Key Vault and its secrets, AKS, container registries, Application Insights, Log Analytics, managed identities, role assignments and resource groups. A resource of any other type is skipped, and a note at the top of the output names it so nothing disappears quietly.
Are the resource properties renamed to the azurerm arguments?
No. Keys inside properties, plus sku, kind and other top-level keys, are copied into the block with their names 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 treat the output as a first draft and let terraform validate tell you what to rename.
How are expressions, loops and conditions handled?
References to params, vars, resources and module outputs become var.x, local.x, azurerm_x.name and module.x references, and string interpolation like '${prefix}-plan' becomes "${local.prefix}-plan". A resource behind if (cond) gets count = cond ? 1 : 0, and a [for x in list: {...}] resource gets count = length(list) with the loop item read from the list. dependsOn and parent become depends_on. A few functions (toLower, concat, format, json, split, join, empty and similar) are translated; anything else, such as uniqueString() or lambdas, is kept as quoted text and listed in a note.
Will long IDs, prices or quoted text change?
No. Numbers are written with the digits you typed, so 8901240544102066246 comes out exactly the same, json('14.50') becomes 14.50, and '00501' stays a string. Quotes, backslashes and line breaks are escaped for HCL, and a literal ${ or %{ is written as $${ or %%{ so Terraform does not try to fill it in.
What if my Bicep file has a mistake?
The converter reads the file properly, so an unclosed brace or string, a double-quoted string or a stray word gives a message with the line and column instead of half-converted output. If you paste an ARM template (JSON) or Terraform code by mistake, it tells you that too.
Is my Bicep file 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. Before applying the result, run terraform init, terraform validate and terraform plan, and use terraform import for resources that already exist in Azure.
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
Azure ARM to Terraform
Convert Azure Resource Manager templates to Terraform HCL with azurerm provider
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