OpenAICloudflare Developer PlatformMay 4, 2026, 12:00 AM

Pipelines - Pipelines and R2 Data Catalog now supported in Terraform

A condensed section focused on the key takeaways first.

Original Post

Quick Digest

Summary

A condensed section focused on the key takeaways first.

openaienmodel: gpt-5-mini-2025-08-07

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.

Full Translation

Translations

A translation section that keeps the flow of the original article.

openaijamodel: gpt-5-mini-2025-08-07

Pipelines - Pipelines と R2 Data Catalog が Terraform でサポートされるようになりました

Pipelines と R2 Data Catalog が Terraform でサポートされるようになりました

公開日: 2026-05-04

概要

Cloudflare Pipelines は Workers または HTTP エンドポイント経由でストリーミングデータを取り込み、SQL で変換し、Apache Iceberg テーブルとして R2 に書き込みます。R2 Data Catalog はそれらの Iceberg テーブル、コンパクション、および R2 SQL、Spark、DuckDB といったクエリエンジンとの互換性を管理します。

Terraform サポート

これらの製品は Terraform で作成・管理できるようになりました。Cloudflare Terraform provider v5.19.0 ↗ でサポートされています。本リリースでは、データカタログ、取り込み用のストリーム、R2 Data Catalog/R2 に書き込むシンク、SQL でそれらを接続するパイプラインの 4 種類の新しいリソースが追加され、データパイプライン全体をインフラストラクチャとしてコード化できます。

新しい Terraform リソース

  • cloudflare_r2_data_catalog ↗ — R2 バケット上でデータカタログを有効化
  • cloudflare_pipeline_stream ↗ — HTTP や Worker バインディング経由でイベントを受け取るストリームを作成
  • cloudflare_pipeline_sink ↗ — R2 Data Catalog または R2 に書き込むシンクを作成
  • cloudflare_pipeline ↗ — ストリームとシンクを SQL で接続するパイプラインを作成

最小の例

以下はストリーム、R2 Data Catalog シンク、パイプラインを作成する最小の例です。

resource "cloudflare_pipeline_stream" "my_stream" {
  account_id = var . cloudflare_account_id
  name = "my_stream"
  format = { type = "json" }
  schema = { fields = [ { name = "value" type = "json" required = true } ] }
  http = { enabled = true , authentication = false , cors = {} }
  worker_binding = { enabled = false }
}
resource "cloudflare_pipeline_sink" "my_sink" {
  account_id = var . cloudflare_account_id
  name = "my_sink"
  type = "r2_data_catalog"
  format = { type = "parquet" }
  schema = { fields = [] }
  config = { account_id = var.cloudflare_account_id bucket = "my-pipeline-bucket" table_name = "my_table" token = var.catalog_token }
}
resource "cloudflare_pipeline" "my_pipeline" {
  account_id = var . cloudflare_account_id
  name = "my_pipeline"
  sql = "INSERT INTO ${ cloudflare_pipeline_sink . my_sink . name } SELECT * FROM ${ cloudflare_pipeline_stream . my_stream . name } "
}

補足

R2 バケット作成、データカタログ設定、スコープ付き API トークンのプロビジョニングを含む、エンドツーエンドの完全な例については、Pipelines Terraform documentation を参照してください。