Cloudflare CLI for generating Terraform configuration and import commands from existing account and zone resources.
$brew install cloudflare/cloudflare/cf-terraforming
AI Analysis
cf-terraforming is Cloudflare's bootstrap CLI for turning existing account or zone resources into Terraform configuration and matching import commands. It is aimed at Terraform adoption and migration work, not day-to-day Cloudflare operations.
What It Enables
- Export existing Cloudflare resources into Terraform HCL for selected account-level or zone-level resource types.
- Generate matching
terraform importcommands or Terraform 1.5 import blocks so existing resources can be brought into state. - Migrate parts of an existing Cloudflare setup into Terraform incrementally instead of rewriting resources by hand.
Agent Fit
- Useful when an agent needs a one-time snapshot of existing Cloudflare state and a starting Terraform representation to work from.
- Output is HCL and plain-text import commands rather than JSON, so follow-up automation is less direct than with inspection-first service CLIs.
- Flags and environment-variable auth support headless runs, but it depends on an initialized Terraform working directory and the README says it is not intended for CI.
Caveats
- Requires Cloudflare credentials plus a prepared Terraform directory with the Cloudflare provider available.
- Coverage depends on supported resource mappings, and some resources need explicit
--resource-idvalues to generate or import correctly.