+++ title = "[TRIAGE] OpenTofu state backend — local file (gitignored) vs Terraform Cloud vs Cloudflare R2?" priority = 9 status = "todo" ticket_type = "task" dependencies = ["25c413"] +++ This is a triage decision ticket. It must be resolved before dependent implementation tickets can proceed. OpenTofu state backend: should the `.tfstate` file be stored locally (gitignored), in Terraform Cloud (free tier), or in Cloudflare R2 (S3-compatible backend)? 1. **Local file** — simplest, but state is lost if the machine changes and cannot be shared. Suitable for solo development. 2. **Terraform Cloud** — free tier available, remote state with locking. Requires a Terraform Cloud account. 3. **Cloudflare R2** — S3-compatible, keeps state within Cloudflare ecosystem. Requires an R2 bucket and API credentials. 1. Research the options above and choose the best approach for this project. 2. Set the chosen backend in `infra/terraform.tf`. Update `infra/.gitignore` if using local state. Document the decision in `infra/README.md`. 3. Mark this ticket done with a note on the chosen approach in the body or a comment. `chore(quotesdb): resolve triage — opentofu-state-backend-local-file-gitignored-vs-terraform-cl`