Skip to content
Start here

R2 Data Catalog

resource cloudflare_r2_data_catalog

required Expand Collapse
account_id: String

Use this to identify the account.

bucket_name: String

Specifies the R2 bucket name.

computed Expand Collapse
id: String

Use this to uniquely identify the activated catalog.

bucket: String

Specifies the associated R2 bucket name.

credential_status: String

Shows the credential configuration status.

name: String

Specifies the catalog name (generated from account and bucket name).

status: String

Indicates the status of the catalog.

maintenance_config: Attributes

Configures maintenance for the catalog.

compaction: Attributes

Configures compaction for catalog maintenance.

state: String

Specifies the state of maintenance operations.

target_size_mb: String

Sets the target file size for compaction in megabytes. Defaults to "128".

snapshot_expiration: Attributes

Configures snapshot expiration settings.

max_snapshot_age: String

Specifies the maximum age for snapshots. The system deletes snapshots older than this age. Format: where unit is d (days), h (hours), m (minutes), or s (seconds). Examples: "7d" (7 days), "48h" (48 hours), "2880m" (2,880 minutes). Defaults to "7d".

min_snapshots_to_keep: Int64

Specifies the minimum number of snapshots to retain. Defaults to 100.

state: String

Specifies the state of maintenance operations.

cloudflare_r2_data_catalog

resource "cloudflare_r2_data_catalog" "example_r2_data_catalog" {
  account_id = "0123456789abcdef0123456789abcdef"
  bucket_name = "my-data-bucket"
}

data cloudflare_r2_data_catalog

required Expand Collapse
bucket_name: String

Specifies the R2 bucket name.

account_id: String

Use this to identify the account.

computed Expand Collapse
id: String

Specifies the R2 bucket name.

bucket: String

Specifies the associated R2 bucket name.

credential_status: String

Shows the credential configuration status.

name: String

Specifies the catalog name (generated from account and bucket name).

status: String

Indicates the status of the catalog.

maintenance_config: Attributes

Configures maintenance for the catalog.

compaction: Attributes

Configures compaction for catalog maintenance.

state: String

Specifies the state of maintenance operations.

target_size_mb: String

Sets the target file size for compaction in megabytes. Defaults to "128".

snapshot_expiration: Attributes

Configures snapshot expiration settings.

max_snapshot_age: String

Specifies the maximum age for snapshots. The system deletes snapshots older than this age. Format: where unit is d (days), h (hours), m (minutes), or s (seconds). Examples: "7d" (7 days), "48h" (48 hours), "2880m" (2,880 minutes). Defaults to "7d".

min_snapshots_to_keep: Int64

Specifies the minimum number of snapshots to retain. Defaults to 100.

state: String

Specifies the state of maintenance operations.

cloudflare_r2_data_catalog

data "cloudflare_r2_data_catalog" "example_r2_data_catalog" {
  account_id = "0123456789abcdef0123456789abcdef"
  bucket_name = "my-data-bucket"
}