Edit

Share via


Overview of the Azure Terraform Resource Provider

The Azure Terraform Resource Provider (Public Preview) enables Azure Terraform workflows across various Azure workflows. Currently, only an export workflow is supported, but planned additions to the resource provider accelerate deployment workflows in Terraform on Azure.

Registration

Terraform

Utilize the azurerm_provider_registration resource:

resource "azurerm_resource_provider_registration" "azureterraform" {
  name = "Microsoft.AzureTerraform"
}

You will need to have your azurerm provider configured as well for the run to succeed.

Terminal

Register the provider with az provider register -n Microsoft.AzureTerraform.

Portal

Register the provider using the Azure Resource Manager guide. Search for Microsoft.AzureTerraform in step 5.

Export

Export functionality is based on the preexisting Azure Export for Terraform tool. These capabilities are exposed through the resource provider. To export resources, choose your tool of choice:

Portal

Follow the quickstart article to export resources to Terraform using Azure portal

Azure CLI

Follow the Azure CLI guide.

Azure PowerShell

Follow the Azure PowerShell guide.

REST

Follow the REST API reference.

Go SDK

Follow the Go SDK reference.

Export Limitations

As the export experience is based on Azure Export for Terraform aztfexport, its limitations are nearly identical to the binary. Refer to the limitations section of the binary documentation.

However, there are also specific resources not supported by the resource provider. These resources aren't supported to ensure security from a usage standpoint. Two types of roles aren't supported:

  • POST roles. They're mostly used for listing credentials.
  • Data plane roles. These roles are used to access user content.

We're planning to keep these limitations in place to ensure security for users. If customers wish to export these types of resources, it's recommended to use the aztfexport tool instead.

Next steps