Customize Environment Variables in Deploy to Netilfy Button/URL

I am trying to create a Deploy to Netlify button to include in a sample Next.js project using PlanetScale. My goal is to include a DATABASE_URL environment variable in the string that the user can customize once the deployment process begins. To do this, I created this link in my ReadMe.

[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/planetscale/nextjs-starter#DATABASE_URL=<YOUR_DB_URL>)

I added #DATABASE_URL=<YOUR_DB_URL> at the end of that link. This does create the environment variable, but the user doesn’t have the ability to configure it during the initial deployment process.

I foud out that I can specify this to happen in the Netlify.toml file like so.

[template.environment]
DATABASE_URL = "Database URL"

However, I’d rather not include the Netlify.toml file if possible and have this built into the Deploy to Netlify button/link without an additional file. Is this possible?

Hi @jamesqquick,

At the moment, the TOML file is the only way to go.