Skip to content

Use d1 databse id from environment variables? #12769

@az-nextsec

Description

@az-nextsec

What is the recommended way to make it so database_id is a variable (e.g. from .env or .dev.vars).

I want all my npx wrangler d1 command to see the same persistent d1 id both local and remote, but I want to treat it as a secret so that it doesn’t become a part of my codebase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions