A tool to import existing Azure resources into Terraform state and generate corresponding HCL configuration.
Azure Export for Terraform (aztfexport) is a command-line tool that imports existing Azure resources into Terraform state and generates the corresponding Terraform configuration files. It solves the problem of migrating manually created or legacy Azure infrastructure to Terraform management without requiring manual import and code writing. The tool ensures the generated state and configuration match the remote resources so that Terraform can manage them going forward.
Azure administrators, DevOps engineers, and platform teams who need to bring existing Azure infrastructure under Terraform control as part of adopting infrastructure-as-code practices.
Developers choose aztfexport because it automates the tedious and error-prone process of manually importing Azure resources into Terraform, significantly reducing migration time and effort. Its integration with Azure resource identification and Terraform's import mechanism provides a reliable path to infrastructure-as-code for pre-existing environments.
A tool to bring existing Azure resources under Terraform's management
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Leverages terraform import under the hood to automatically bring Azure resources into Terraform state, eliminating manual import commands for each resource.
Supports both Terraform AzureRM and AzAPI providers, as stated in the README, offering flexibility depending on resource management needs.
Aims to generate Terraform state and configuration that are consistent with remote resources, so terraform plan shows no diff, reducing initial configuration drift.
Uses aztft to identify the correct Terraform resource type for Azure resource IDs, improving accuracy over manual mapping.
The README explicitly states generated configurations are not meant to be comprehensive and do not ensure full infrastructure reproducibility, requiring manual adjustments.
Requires Terraform >= v0.12 installed and may need Azure CLI for authentication, adding setup steps and potential version conflicts.
Linked limitations page indicates potential gaps in resource support or edge cases, meaning some scenarios may require workarounds or manual intervention.