Repository navigation
Take the R2 access key ID as an input, and drop r2-keys.sh - #28
Merged
Merged
Conversation
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
benbirt
force-pushed
the
claude/no-r2-keys
branch
from
November 29, 2026 14:17
5ff265b to
4df24b7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tofu.ymlno longer runstools/r2-keys.shfrom the calling repository, so no repository needs to carry that script.R2's S3 API takes an API token's ID as the access key ID and the token's SHA-256 as the secret. The script spent most of its length asking Cloudflare for the ID, which is fixed for the life of the token and not secret. So:
r2_access_key_id: the ID of the token inCLOUDFLARE_API_TOKEN. The job exports it asAWS_ACCESS_KEY_ID.AWS_SECRET_ACCESS_KEY, masked.tools/r2-keys.shis deleted here, and the Settings workflow passes this repository's token ID.The ID is an input and not in the backend block because the S3 backend will not take
access_keyfrom configuration and the secret from the environment, and OpenTofu refuses a sensitive value in a backend block.Breaking for callers when they move their pin: they must pass
r2_access_key_id. eavesbard and benbirt.io have changes ready that do so and delete their copies of the script; they need this merged and tagged first. Callers on an earlier commit are unaffected.Replacing a token now means changing its ID in each caller as well as the secret; the README says how to read the ID.
Checked locally:
//github:github.planwithAWS_ACCESS_KEY_IDset to the ID andAWS_SECRET_ACCESS_KEYto the token's SHA-256 reports no changes. The Settings check on this pull request exercises the workflow itself.README and comments were written by Neon and checked against the code.
🤖 Generated with Claude Code