terraform-provider-cloudflare
terraform-provider-cloudflare copied to clipboard
R2 custom domain
Current Terraform and Cloudflare provider version
terraform: v1.4.6 provider: 4.8.0
Description
Currently it is not possible to configure public access to a R2 bucket via the terraform provider.
Use cases
See https://developers.cloudflare.com/r2/buckets/public-buckets/
Potential Terraform configuration
resource "cloudflare_r2_bucket" "example" {
account_id = "f037e56e89293a057740de681ac9abbe"
name = "terraform-bucket"
location = "enam"
public_access {
enabled = true
custom_domains = ["media.example.org", "media.example.com"]
}
}
References
No response
Community Note
Voting for Prioritization
- Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
- If you are interested in working on this issue, please leave a comment.
- If this would be your first contribution, please review the contribution guide.
i notice this isn’t even available through the public API yet, but once it is, I may be able to work on that.
Switching over to Cloudflare as a result of the Google killing off Google Domains, but the inability to automate this via Terraform is a big bummer, previously my static websites were completely Terraform-managed.
We are trying to import our assets from CF into terraform, and it would be really nice if this would all hook in nicely.
Would be cool to have a more advanced version of cloudflare_r2_bucket
. Now I rely on the AWS resource to setup CORS etc, which isn't very stable when used by other providers.
The inability to automatically setup a bucket is a big deal breaker for enterprise-level projects...
hmm, this seems a bit half-assed
is there a workaround... e.g. is there a private bucket url or something that I can use with a Record
resource to manually set up the same thing that the custom domain feature does?
At the moment it looks like I'd have a better time with S3 + CloudFront
Hello, is there any update on this? Will these be implemented anytime soon? I was wanting to manage a public bucket (with the additional DNS records). I also found a similar issue on the Cloudflare boards.
https://community.cloudflare.com/t/adding-custom-domains-to-r2-buckets/504805
Thanks
is there a workaround
there's some undocumented API
POST /client/v4/accounts/${account_id}/r2/buckets/${bucket}/custom_domains
{
domain: ${domain}
zoneId: ${zone_id}
zoneName: ${zone_name}
}
PUT /client/v4/accounts/${account_id}/r2/buckets/${bucket}/policy?access=CnamesOnly&cname=${domain}&cname=${otherDomain}&...
DELETE /client/v4/accounts/${account_id}/r2/buckets/${bucket}/custom_domains/${domain}
but I'm guessing it's undocumented for a reason
This issue has been closed as we are now tracking this internally with service teams directly. If you would like an update or to be notified when/if the product ships with this change, please reach out to Cloudflare Support or your account team who can watch the internal feature request for you.
@jacobbednarz I highly disagree with you marking this issue as "completed" just because you are also tracking it in another system now. Especially since you indicate you may not even implement this.
This issue tracker is the place for external users to track and be notified when an issue is completed. It is absolutely ludicrous to expect everyone to reach out to Cloudflare support now, to get them to notify each of us individually when the feature is completed.
@markbaird very bizarre, indeed. So 2007 or something. And certainly not how GitHub issues are intended to be used.
I'm surprised that this a) isn't possible; but more so that b) it got removed from public view when people are actively asking for it. I think it's great that it's being worked on internally; but surely there's a better process than asking people to work with CF support in order to track its progress.