Skip to content

CloudFormationToTerraform

Dennis Lee edited this page May 27, 2026 · 1 revision

title: CloudFormation_To_Terraform radar_quadrant: Tools radar_ring: Assess radar_position: center

CloudFormation_To_Terraform

CloudFormation_To_Terraform is a community open-source tool for converting AWS CloudFormation template files to Terraform HCL. The project is available at github.com/aperswal/CloudFormation_To_Terraform. It reads CloudFormation JSON or YAML templates and outputs equivalent Terraform resource definitions, automating the mechanical translation step when migrating from CloudFormation to Terraform as the IaC standard.

Radar Assessment

Placed in Tools / Assess / center.

Teams on AWS who have accumulated CloudFormation stacks and want to adopt Terraform face a translation problem: rewriting templates manually is error-prone and time-consuming, but the alternative tools cover adjacent problems rather than this specific one. CloudFormation IaC Generator and CDK Migrate (Techniques/Assess/inner) reverse-engineers live AWS resources into CloudFormation first; Terraformer generates Terraform directly from live infrastructure across multiple providers. Neither operates on existing CloudFormation template files as input.

CloudFormation_To_Terraform fills this gap: it takes the template files you already have and produces Terraform HCL, which can then be refined and imported into a state file. The output requires review and cleanup — resource argument names and provider-specific conventions differ between CFN and Terraform — but it eliminates the blank-page problem for large template migrations.

Center position reflects the community-maintained provenance (not an official AWS or HashiCorp tool), the requirement for output cleanup, and the narrow applicability to teams with existing CFN template files specifically. Teams working from live infrastructure would be better served by Terraformer.

Trial gate: at least one non-trivial CloudFormation template converted to Terraform HCL with the output successfully applied via terraform apply against a real AWS account.

Clone this wiki locally