A CLI tool that generates Terraform configurations from existing Cloudflare resources to migrate infrastructure to IaC.
cf-terraforming is a command-line tool that automatically generates Terraform configuration files from existing Cloudflare resources. It solves the problem of manually writing Terraform code for pre-existing infrastructure by querying the Cloudflare API and converting the live state into HashiCorp Configuration Language (HCL). This enables teams to rapidly onboard their Cloudflare setups into Terraform-managed workflows.
DevOps engineers, SREs, and platform teams managing Cloudflare resources who are adopting or expanding their use of Terraform for Infrastructure as Code.
It eliminates the tedious and error-prone process of manually transcribing Cloudflare configurations into Terraform, providing a reliable, automated bridge to IaC with support for a comprehensive set of Cloudflare resources and seamless integration with Terraform's import functionality.
A command line utility to facilitate terraforming your existing Cloudflare resources.
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 hundreds of Cloudflare resource types across DNS, security, workers, and more, as detailed in the extensive v5 provider table in the README.
Generates both traditional 'terraform import' commands and modern import blocks for Terraform 1.5+, simplifying state synchronization with existing resources.
Works with API tokens or keys via environment variables or config files, as outlined in the Authentication section, promoting security and ease of use.
Output can be piped into 'cdktf convert' to generate code in languages like TypeScript, enabling programmatic Infrastructure as Code workflows.
The README explicitly warns against use in continuous integration, limiting its utility in automated pipelines and requiring manual runs.
Admits that some generated HCL may not pass 'terraform validate' due to inconsistencies, necessitating manual adjustments and reducing reliability.
Certain resources require additional flags like '--resource-id' with specific mappings, adding complexity for less common configurations.