cloudflare_r2_bucket_domain_add
Attach a custom domain to an R2 bucket for public access. Cloudflare automatically creates a CNAME record to enable serving content through your domain.
Instructions
Attach a custom domain to an R2 bucket, enabling public access via that domain. The domain must belong to a zone in the same account. Cloudflare automatically creates a CNAME record.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Custom domain to attach (e.g., assets.example.com) | |
| enabled | No | Whether the custom domain is enabled (default: true) | |
| zone_id | Yes | Zone ID or zone name that owns the domain (e.g., example.com or 32-char hex ID) | |
| bucket_name | Yes | Name of the R2 bucket |