Pipelines and R2 Data Catalog now supported in Terraform
Key Points
- Terraform provider v5.19.0 adds Pipelines and R2 Data Catalog
- Four new resources to define streaming ETL as IaC
- Pipelines use SQL to transform and write Iceberg tables to R2
Summary
Cloudflare Pipelines and R2 Data Catalog are now manageable via the Cloudflare Terraform provider v5.19.0. You can define ingestion streams, sinks (R2 or R2 Data Catalog), and SQL pipelines as infrastructure-as-code to write Apache Iceberg tables to R2 and integrate with query engines like R2 SQL, Spark, and DuckDB.
Key Points
- Provider: use Cloudflare Terraform provider v5.19.0 to access the new resources.
- New resources:
cloudflare_r2_data_catalog,cloudflare_pipeline_stream,cloudflare_pipeline_sink,cloudflare_pipeline. - Streams ingest events via HTTP endpoints or Worker bindings and accept structured schemas (e.g., JSON).
- Sinks write to R2 or the R2 Data Catalog (e.g., Parquet/Iceberg), and the data catalog manages compaction and query compatibility.
- Pipelines connect streams to sinks with SQL statements to transform and route data (INSERT FROM stream INTO sink).
- Practical workflow: create an R2 bucket and data catalog, provision a scoped token, create a stream and sink, then deploy a pipeline that inserts transformed data into the sink.
For full examples (including R2 bucket creation and token provisioning), see the Pipelines Terraform documentation.