Azure – You can now export your resources with Terraform (preview)

As you know, you have been able to export your Azure deployment(s) or resource(s) into ARM templates using the Export template option.

Well, good news as now you can also use Terraform export Smile

First thing first, you need to register the Microsoft.AzureTerraform provider either from the Azure portal, Azure Cli or PowerShell; you can also use Terraform

  • Azure portal: from the Resource providers blade of the subscription, search for Microsoft.AzureTerraform

image

  • PowerShell: use the below code

Register-AzResourceProvider -ProviderNamespace Microsoft.AzureTerraform

  • Cli: use the below code

az provider register -n Microsoft.AzureTerraform

  • Terraform: use the below Hashicorp code

resource “azurerm_resource_provider_registration” “azureterraform” {
   name = “Microsoft.AzureTerraform”
}

Once done you can use either Azure Export Terraform tool, Azure portal, PowerShell or Cli

image

Leave a Comment

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.