Import existing AWS infrastructure into Terraform and automatically generate corresponding HCL configuration files.
aws2tf is a Python-based tool that automates the import of existing AWS infrastructure into Terraform configurations. It scans AWS accounts, discovers resources, and generates the corresponding Terraform HCL code, solving the problem of manually writing Terraform files for pre-existing cloud resources. The tool also resolves dependencies and replaces hardcoded values with Terraform references to create production-ready configurations.
DevOps engineers, cloud infrastructure teams, and platform engineers who are adopting Terraform for Infrastructure as Code (IaC) and need to migrate existing AWS resources into Terraform management.
Developers choose aws2tf because it dramatically reduces the time and effort required to onboard existing AWS infrastructure to Terraform, with comprehensive support for 1,612 AWS resources and intelligent dependency resolution that ensures generated configurations are complete and functional.
aws2tf - automates the importing of existing AWS resources into Terraform and outputs the Terraform HCL code.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports 1,612 Terraform AWS provider resources with 100% coverage, ensuring nearly all existing AWS infrastructure can be imported, as documented in the README's recent improvements.
Automatically finds and imports dependent resources, reducing manual effort and creating complete Terraform configurations that aim for zero changes in terraform plan.
Allows adding resources to existing Terraform files using the -m flag, enabling gradual migration without starting from scratch, as shown in the usage guide.
Can import resources from deployed AWS CloudFormation stacks via the -s option, streamlining transitions from CloudFormation to Terraform for legacy deployments.
Requires specific versions of Python, AWS CLI, Terraform, and jq, which can be cumbersome to install and maintain, as noted in the prerequisites section.
Uses its own local state directory and cannot integrate with remote backends like S3, hindering team collaboration and scalability, as admitted in the README.
The README warns that errors can occur due to diverse AWS configurations, requiring manual issue reporting and fixes, which may delay migrations.
Scanning everything in an account is not recommended due to long runtimes, and fast mode is experimental, indicating scalability challenges for extensive infrastructures.