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

Ability to read cloudflare_api_token R2/S3 equivalent keys #2873

Closed
sjlu opened this issue Oct 24, 2023 · 3 comments
Closed

Ability to read cloudflare_api_token R2/S3 equivalent keys #2873

sjlu opened this issue Oct 24, 2023 · 3 comments
Labels
triage/duplicate Indicates an issue is a duplicate of other open issue.

Comments

@sjlu
Copy link

sjlu commented Oct 24, 2023

Current Terraform and Cloudflare provider version

Terraform v1.5.5
on darwin_arm64

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

Description

Today the API value of the token is produced but the S3 equivalent keys are not. Wondering if there's a way to provide those keys through Terraform so that they can be referenced in other resources.

Use cases

For example, getting the S3 equivalent keys and passing it to an Elastic Beanstalk environment.

Potential Terraform configuration

resource "cloudflare_api_token" "r2" {
  name = "r2"

  policy {
    permission_groups = [
      data.cloudflare_api_token_permission_groups.all.r2["Workers R2 Storage Bucket Item Read"],
      data.cloudflare_api_token_permission_groups.all.r2["Workers R2 Storage Bucket Item Write"]
    ]
    resources = {
      "com.cloudflare.edge.r2.bucket.*" = "*"
    }
  }
}

resource "some_other_resource" "r2" {
  r2_access_key = cloudflare_api_token.r2_access_key
  r2_secret_key = cloudflare_api_token.r2_secret_key
}

References

No response

@sjlu sjlu 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 Oct 24, 2023
@github-actions
Copy link
Contributor

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
Copy link
Member

duplicate of #2713, specifically #2713 (comment)

@jacobbednarz jacobbednarz closed this as not planned Won't fix, can't repro, duplicate, stale Oct 24, 2023
@jacobbednarz jacobbednarz added triage/duplicate Indicates an issue is a duplicate of other open issue. and removed 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 Oct 24, 2023
@sjlu
Copy link
Author

sjlu commented Oct 24, 2023

Makes sense, docs would be nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/duplicate Indicates an issue is a duplicate of other open issue.
Projects
None yet
Development

No branches or pull requests

2 participants