Harold Anderson
Harold Anderson
CDCloudflare Developers
Created by Harold Anderson on 10/14/2024 in #pages-help
Where to put database_id for a D1 database?
I am trying to figure out where to put the database_id for a D1 database. I know you can put it in the [[d1_databases]] section of wrangler.toml, but this is a security risk because wrangler.toml is checked into git. So maybe it should go in .dev.vars? But then how do I reference it in wrangler.toml, or is that not necessary? If I put it in .dev.vars, how would wrangler know that it is for a D1 database? And then should it go into wrangler secrets for deployment? Thanks in advance.
15 replies