You must generate an Access Key before getting started. All examples will utilize access_key_id and access_key_secret variables which represent the Access Key ID and Secret Access Key values you generated.
This example shows how to configure R2 with Terraform using the AWS provider ↗.
With terraform ↗ installed, create main.tf and copy the content below replacing with your Account ID and R2 credentials.
You can then use terraform plan to view the changes and terraform apply to apply changes.
Was this helpful?
What did you like?
What went wrong?
Thank you for helping improve Cloudflare's documentation!