🤯 Azure Can Export Terraform Now? I Just Found Out.

2025-07-25
🤯 Azure Can Export Terraform Now? I Just Found Out.

As someone who’s spent a lot of time advocating for Infrastructure as Code (IaC), I’ve always had a love-hate relationship with cloud portals.

They’re convenient, sure — but also risky:

  • ⚠️ Too easy to click
  • ⚠️ Too hard to track
  • ⚠️ Nearly impossible to reproduce reliably at scale

That’s why I embraced Terraform early on.
It gave me:

  • ✅ Version-controlled infrastructure
  • ✅ Team collaboration with shared ownership
  • ✅ Repeatable, modular code I can reuse across environments
  • ✅ Guardrails for governance, auditability, and policy compliance

🧱 But Even with Terraform, I Faced These 4 Roadblocks

  1. Reverse-engineering resources built in the Azure Portal
  2. Deploying Marketplace resources that don’t come with clean IaC examples
  3. Putting legacy, manually created infrastructure back under Terraform
  4. Resources not yet supported by the azurerm provider
    → Often requiring AzAPI and writing raw ARM-style configs manually

Each of these slows down the IaC journey — and makes it harder to scale clean, maintainable infrastructure.


🚀 Then I Noticed Something New

While building a test environment in Azure, I spotted this:
👉 A ** Terraform”** tab in the Azure portal. Azure Terraform Export Button

Click it, and Azure now generates ready-to-use .tf files —
even for:

  • Azure Marketplace resources
  • Some unsupported services (via AzAPI blocks)

🎉 Why This Matters

It means:

  • 🔁 You can experiment quickly and still walk away with a Terraform template
  • 🧱 The code might not follow the DRY principle — but it gives you a solid starting point,
    which you can then refine using AI to meet your team’s coding standards
  • 🚀 You can begin codifying legacy resources without the boring translation work
  • 🧩 You’ll even get help generating code for AzAPI resources, when azurerm hasn’t caught up yet

📎 Official Microsoft Announcement

🔗 Terraform Export from Azure Portal — Public Preview