Skip to content
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

R2: allow editing of "Object lifecycle rules" #2751

Closed
kaufmo opened this issue Sep 8, 2023 · 5 comments
Closed

R2: allow editing of "Object lifecycle rules" #2751

kaufmo opened this issue Sep 8, 2023 · 5 comments
Labels
kind/enhancement Categorizes issue or PR as related to improving an existing feature. workflow/pending-public-documentation Indicates an issue or PR requires changes to public documentation confirming suitability for use. workflow/pending-upstream-library Indicates an issue or PR requires changes from an upstream library.

Comments

@kaufmo
Copy link

kaufmo commented Sep 8, 2023

Current Terraform and Cloudflare provider version

Terraform v1.5.6
on linux_amd64

  • provider registry.terraform.io/cloudflare/cloudflare v4.14.0

Description

as for now there are multiple resources to manage rules from cloudflare it would also be nice to manage the object lifecycle rules in the r2 storage

Object lifecycle rule:
Bildschirmfoto vom 2023-09-08 07-05-11
Bildschirmfoto vom 2023-09-08 07-05-38

Rules:
Bildschirmfoto vom 2023-09-08 07-07-34

Use cases

One of our use cases is that we use the R2 Bucket as CI/CD Cache and therefor it would be nice to enable an object lifecycle rule where the objects gets deleted for example after 90 days

Potential Terraform configuration

resource "cloudflare_object_lifecycle_ruleset" "example" {
  account_id = "xxx"
  bucket_id = "xxx"

  rules = [
    {
      name = "Delete old objects"
      delete_uploaded_objects = {
        type: "days"
        value: 90
      }
      enabled = true
    }
  ]
}

References

No response

@kaufmo kaufmo added kind/enhancement Categorizes issue or PR as related to improving an existing feature. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Sep 8, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2023

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.

@jacobbednarz jacobbednarz added workflow/pending-upstream-library Indicates an issue or PR requires changes from an upstream library. workflow/pending-public-documentation Indicates an issue or PR requires changes to public documentation confirming suitability for use. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Sep 8, 2023
@Cyb3r-Jak3
Copy link
Contributor

You can use the AWS terraform provider to add items like lifecycle configurations
https://developers.cloudflare.com/r2/examples/terraform-aws/

@kaufmo
Copy link
Author

kaufmo commented Sep 13, 2023

You can use the AWS terraform provider to add items like lifecycle configurations https://developers.cloudflare.com/r2/examples/terraform-aws/

ah okay good to know thx, is this the prefered way or will this also be added for the cloudflare provider?

@Cyb3r-Jak3
Copy link
Contributor

Personally, I'd recommend doing all the advanced configuration stuff like CORS or lifecycle rules with the aws provider. R2 just implements the S3 API, so the provider will be able to do more and doesn't require work from Cloudflare's side.

@jacobbednarz
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Categorizes issue or PR as related to improving an existing feature. workflow/pending-public-documentation Indicates an issue or PR requires changes to public documentation confirming suitability for use. workflow/pending-upstream-library Indicates an issue or PR requires changes from an upstream library.
Projects
None yet
Development

No branches or pull requests

3 participants