Infrastructure as Code
Where Cloudflare's wrangler.toml definitions cannot be used,Terraform is used for managing
the infrastructure that your project needs. All Terraform definitions are found in the infra/terraform
directory.
Cloudflare's R2 is used for storing the terraform state.
The following providers are used:
- Cloudflare - note: version 4.x.x, not alpha v5
- Supabase
Cloudflare R2 as Terraform State Backend
Cloudflare R2 is used as the terraform state backend. See Cloudflare's docs for more information.
note
In terraform, you must use environment variables to define the credentials. As a result, the s3 backend in terraform expects AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY to be set. You can generate these from your Cloudflare account in the Cloudflare dashboard.
See https://developers.cloudflare.com/r2/api/s3/tokens/ for more information.