Best way to configure wrangler.toml for team D1 development with per-dev env vars
Question: I’m setting up a Cloudflare Worker with D1 for team development. Each developer will have their own Cloudflare account to deploy/test independently.
Goal: - Developers should override local D1 configs (DB name, ID, etc.) via environment variables (e.g., .dev.vars). - Avoid hardcoding values in wrangler.toml.
For example, something like this in wragler.toml
[env.local]name = "" # read from env based on the dev config[[env.local.d1_databases]]binding = "DB"database_name = "" # read from env based on the dev confgdatabase_id = "" # read from env based on the dev confg
[env.local]name = "" # read from env based on the dev config[[env.local.d1_databases]]binding = "DB"database_name = "" # read from env based on the dev confgdatabase_id = "" # read from env based on the dev confg
Is there any way to achieve this or any other alternatives?