terraform-management

Manage Cloudflare resources as code using Terraform and Pulumi.

Updated Jan 8, 2026
One-click install
npx skills add https://github.com/biwakonbu/cc-plugins --skill terraform-management
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terraform-management
Source: https://github.com/biwakonbu/cc-plugins/tree/main/plugins/cloudflare-knowledge/skills/terraform-management
Command: npx skills add https://github.com/biwakonbu/cc-plugins --skill terraform-management

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a practical guide to managing Cloudflare resources as code using Terraform and Pulumi, enabling reproducible infrastructure, safer changes, and centralized configuration across environments.

Core Features & Use Cases

  • Declarative IaC for Cloudflare resources such as DNS records, zones, workers, WAF rules, Zero Trust settings, KV/R2/D1 bindings, and tunnels.
  • Terraform provider configuration, authentication methods (API Token recommended; Global API Key deprecated), and environment variable setup.
  • cf-terraforming for exporting existing Cloudflare resources to Terraform; Pulumi examples showing cloudflare integration.
  • Clear guidance on when to use Terraform vs Wrangler for Workers and how to combine Wrangler for code with Terraform for infrastructure.

Quick Start

  1. Install Terraform and the Cloudflare provider configuration.
  2. Create a Terraform file with a Terraform block for the Cloudflare provider and a sample resource, e.g., a zone and a DNS record.
  3. Export existing resources using cf-terraforming generate and/or import blocks as needed.
  4. Run terraform init, plan, and apply to create or update resources.

Frequently Asked Questions about terraform-management

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage Cloudflare resources with Terraform?

You can manage Cloudflare resources with Terraform by declaring infrastructure as code for DNS records, Workers, and WAF rules. It requires setting up the Terraform provider configuration and authenticating via Cloudflare API tokens to enable reproducible infrastructure.

How do I export existing Cloudflare configurations to Terraform?

Export existing Cloudflare configurations to Terraform using the cf-terraforming tool. Running the generate command outputs Terraform code for your current resources, allowing you to import existing infrastructure into your declarative IaC workflow.

When should I use Terraform instead of Wrangler for Cloudflare Workers?

Use Terraform for managing Workers infrastructure like bindings and routes, while using Wrangler for deploying the Worker code itself. Combining both tools allows you to separate infrastructure management from application deployment safely.

Can I use Pulumi for Cloudflare infrastructure as code?

Yes, you can use Pulumi for Cloudflare infrastructure as code. The Skill provides Pulumi examples showing Cloudflare integration, enabling centralized configuration and safer changes across multiple environments as an alternative to Terraform.

What authentication is required for the Cloudflare Terraform provider?

The Cloudflare Terraform provider requires authentication using Cloudflare API tokens configured via environment variables. Using API Tokens is the recommended method, as the Global API Key is deprecated and less secure for managing your infrastructure.

What Cloudflare resources can I define using infrastructure as code?

You can define Cloudflare DNS records, zones, Workers, WAF rules, Zero Trust settings, KV, R2, D1 bindings, and tunnels using infrastructure as code. This allows you to provision and manage your entire Cloudflare stack declaratively.