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.
42 lines
1.5 KiB
Markdown
42 lines
1.5 KiB
Markdown
+++
|
|
title = "Define Cloudflare Pages project resource — build config, output dir, git repo connection or artifact upload"
|
|
priority = 7
|
|
status = "todo"
|
|
ticket_type = "task"
|
|
dependencies = ["25c413", "2d1371", "fc9bfd", "e2bd9b"]
|
|
+++
|
|
|
|
<context>
|
|
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).
|
|
|
|
Cloudflare Pages hosts the Yew/Wasm frontend. Resolve TRIAGE ticket fc9bfd (Pages build strategy: CI build vs pre-built artifact upload) before implementing this resource.
|
|
</context>
|
|
|
|
<goal>
|
|
Define the Cloudflare Pages project resource in `infra/pages.tf`:
|
|
1. `cloudflare_pages_project` resource for the `quotesdb-ui` project
|
|
2. Configure the build settings (build command: `trunk build`, output directory: `dist/`)
|
|
3. Connect to the git repository or configure for direct artifact upload (per TRIAGE fc9bfd)
|
|
|
|
Every block must have a comment.
|
|
</goal>
|
|
|
|
<constraints>
|
|
- Resolve TRIAGE ticket fc9bfd (Pages build strategy) before choosing git-connected vs artifact upload.
|
|
- Resolve TRIAGE ticket e2bd9b (SPA routing — 404 fallback) before finalising Pages config.
|
|
- The output directory must match Trunk's `dist/` output.
|
|
</constraints>
|
|
|
|
<validation>
|
|
Run from the `infra/` directory:
|
|
|
|
```sh
|
|
tofu validate
|
|
tofu plan
|
|
```
|
|
</validation>
|
|
|
|
<commit>
|
|
`feat(quotesdb): define Cloudflare Pages project resource in OpenTofu`
|
|
</commit>
|