-
Notifications
You must be signed in to change notification settings - Fork 619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add r2_bucket_binding to cloudflare_worker_script #1825
Add r2_bucket_binding to cloudflare_worker_script #1825
Conversation
changelog detected ✅ |
thanks @yonran; can you please add acceptance test coverage for this new feature? |
you were about 3 hours too quick 😉 cloudflare/cloudflare-go#1028 added support for R2 bucket creation and deletion. |
@jacobbednarz, I tried to update the acceptance test. As cloudflare-go 0.47.0, has not been released yet, compiling requires you to upgrade to master ( However, I am running into a problem that the create bucket API does not seem to be working for me; when I try to |
@yonran Looks like R2 had a change cloudflare/cloudflare-go#1033. Waiting on R2 team response's before patching. |
Now that CloudFlare has fixed the create bucket api (cloudflare/workers-sdk#1654 (comment)), my acceptance test passes against cloudflare-go master. Still waiting on cloudflare-go to release 0.47.0 though.
|
[email protected] has been released but it contained a number of minor breaking changes and an accidental regression to |
v0.47.1 was released to address that specific issue. |
I'll bump the library version in another PR and we can pull it in here once it is ready. |
Thanks @jacobbednarz for merging the cloudflare-go upgrade! Do you want any other fixes or rebases on this PR? |
nothing more from you; i just ran out of time to run the acceptance test suite last week. the API for the R2 bucket create has (hopefully, 🤞 ) stabilised with cloudflare/cloudflare-go#1035 and i'm cutting a release now for that and another API issue. aiming to get this sorted today. |
acceptance tests are green
|
thanks for the persistence here @yonran, this is great 🥇 |
This functionality has been released in v3.22.0 of the Terraform Cloudflare Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
Add support for adding r2 bucket bindings to a
cloudflare_worker_script
. This is part of #1664The new block
r2_bucket_binding
within acloudflare_worker_script
allows you to bind an r2 bucket to a worker script. Each binding becomes a global variable within the worker script (cloudflare_worker_script
does not support creating a worker with format: module yet).No tests yet since cloudflare-go does not yet support creating r2 buckets.