Loading Bicep to Terraform Converter...

How to Convert Bicep to Terraform - Step by Step Guide

Step 1

Paste Your Bicep Code

Copy your Azure Bicep code into the left editor. You can upload .bicep files using the Upload button. The converter supports parameters, variables, resources, and outputs.

Paste directly: Copy your Bicep code and paste into the input editor
Upload a file: Click "Upload" to select a .bicep file
Try the sample: Click "Sample" to load example Bicep code
Step 2

Review the Terraform HCL Output

The converter automatically maps Bicep resource types to Terraform azurerm provider resources. Bicep parameters become Terraform variables, and Bicep outputs become Terraform outputs.

Resource mapping: Microsoft.Storage/storageAccounts becomes azurerm_storage_account
Parameter conversion: Bicep params convert to Terraform variables
Syntax highlighting: Color-coded HCL for readability
Step 3

Download or Copy Terraform Configuration

Export your converted Terraform HCL. The generated configuration includes required provider blocks and can be used with the Terraform CLI after review.

Copy to clipboard: One-click copying for pasting into your project
Download as file: Save as a main.tf file for your project
Validation status: Green checkmark confirms successful conversion
Step 4

Initialize and Apply with Terraform

Run Terraform CLI commands to initialize and deploy your Azure infrastructure.

Initialize: Run terraform init to download providers
Plan changes: Run terraform plan to preview
Apply: Run terraform apply after review

Frequently Asked Questions

What is Bicep to Terraform conversion?

Bicep to Terraform conversion transforms Azure Bicep files into Terraform HCL with the azurerm provider. While Bicep is Azure-specific, Terraform enables multi-cloud infrastructure management. This converter helps teams expand from Azure-only to multi-cloud deployments.

Why migrate from Bicep to Terraform?

Teams migrate for multi-cloud support (managing AWS, GCP alongside Azure), larger ecosystem (10,000+ Terraform modules), better CI/CD integration, existing Terraform expertise, unified tooling across clouds, and avoiding Azure-only lock-in. Terraform's broader adoption also means more community support and tooling.

Does this support all Bicep resource types?

The converter supports commonly used Azure resources including Storage Accounts, Virtual Machines, Virtual Networks, App Services, SQL databases, Key Vaults, AKS clusters, and more. It handles parameters, variables, and outputs. Unsupported resources are noted with comments for manual conversion.

How do I handle existing Bicep-managed resources?

Use terraform import to import resources into Terraform state without recreating them. Document current state, import resources one by one, run terraform plan to verify no unexpected changes, and test in non-production first.

What Bicep features don't translate directly?

Bicep modules become Terraform modules, parent/child resource relationships need adjustment, some Bicep-specific functions require HCL equivalents, and decorators become variable validation. The converter handles most cases but complex Bicep features may need manual refinement.

Is the converted Terraform code production-ready?

The converter generates syntactically correct HCL but requires review. Verify property mappings, configure backend for state storage, add lifecycle rules where needed, set up variable files, and test thoroughly. Always run terraform plan before applying changes in production.