I've successfully created a Cloudflare R2 bucket u...
# general
h
I've successfully created a Cloudflare R2 bucket using the following code, but I'm unsure how to create the associated access
KEY
and
SECRET
for this bucket. Could someone please guide me on how to do this? Thanks.
Copy code
const bucket = new cloudflare.R2Bucket("user-r2-bucket", {
  accountId: CLOUDFLARE_ACCOUNT_ID!,
  name: bucketName,
  location: region,
});
f
@helpful-psychiatrist-67296 You can try with builtin access-key creation function?
import pulumi
import pulumi_cloudflare as cloudflare
# Replace these values accordingly
account_id = "your-account-id"
bucket_name = "your-bucket-name"
location = "your-location"
# Create the R2 bucket
bucket = cloudflare.R2Bucket(
"user-r2-bucket",
account_id=account_id,
name=bucket_name,
location=location,
)
# Create access key for R2 bucket
access_key = cloudflare.R2AccessKey(
"r2-access-key",
account_id=account_id,
service="s3",
)
h
I couldn't find it