You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vibed/quotesdb/.beans/quotesdb-zzm3--set-up-infra...

1.9 KiB

title status type priority created_at updated_at blocked_by
Set up infra/ OpenTofu project — providers.tf, terraform.tf, .gitignore for state completed task critical 2026-03-10T23:32:06Z 2026-03-10T23:32:13Z
quotesdb-esnq
Infrastructure is managed with OpenTofu using the Cloudflare provider. Configuration lives in `infra/`. Resources include a Cloudflare Worker (API), Cloudflare D1 database (bound to the worker), and a Cloudflare Pages project (UI frontend). Bootstrap the OpenTofu project in `infra/`: 1. Create `infra/providers.tf` — declare the Cloudflare provider with the required version 2. `infra/terraform.tf` — **use the local file backend** (07feaa resolved: local file is the correct choice for this solo project). The local backend is OpenTofu's default, so no explicit `backend` block is needed in `terraform.tf`. The file only needs the `required_providers` block (already partially present in `main.tf` — move it to `terraform.tf` and remove from `main.tf`). 3. Create `infra/.gitignore` — ignore `*.tfstate`, `*.tfstate.backup`, `.terraform/`, `.terraform.lock.hcl` 4. Run `tofu init` to initialise the provider - State backend is **local file** (resolved by 07feaa). No `backend` block is required — omitting it uses the local default. - The Cloudflare provider requires an API token — document the expected environment variable (`CLOUDFLARE_API_TOKEN`) in a comment in `providers.tf`, do not hardcode it. - Every `resource` and `data` block must have a comment explaining its purpose (per CLAUDE.md). - Note: `infra/main.tf` currently contains the `terraform` block — move it to `infra/terraform.tf` during this task. Run from the `infra/` directory:
tofu validate
tofu plan
`chore(quotesdb): bootstrap OpenTofu infra project with Cloudflare provider`