Expand description
#3319: the Hyperdrive settings of bynk.toml.
Two tables name a Postgres capability (capability Main = Postgres) and
say where its connection string comes from. Neither holds a connection
string: a string is a secret, and bynk.toml is committed. Each names an
environment variable to read it from.
# Deploy: `bynk deploy` makes or updates the Hyperdrive config from the
# variable, or adopts a config that already exists (no string needed).
[deploy.hyperdrive.Main]
connection_env = "MAIN_DATABASE_URL"
config_id = { production = "0123…" }
# Development: `bynk dev` hands the variable's value to `wrangler dev`.
[dev.hyperdrive.Main]
connection_env = "MAIN_LOCAL_DATABASE_URL"Structs§
- Hyperdrive
Deploy - One capability’s
[deploy.hyperdrive.<Capability>]entry.
Constants§
- DEPLOY_
ENTRY_ KEYS - The keys of a
[deploy.hyperdrive.<Capability>]entry. - DEV_
ENTRY_ KEYS - The keys of a
[dev.hyperdrive.<Capability>]entry.
Functions§
- deploy_
hyperdrive_ from - The
[deploy]table’shyperdriveentries. - dev_
hyperdrive_ from - The
[dev]table’shyperdriveentries. - is_
config_ id - Whether
idis shaped like a Hyperdrive config id: 32 hexadecimal characters. It goes into an authenticated API path, so nothing else (a/,?or..) may reach it. - is_
env_ var_ name - Whether
namecan be an environment variable’s name: a letter or_, then letters, digits and_. A value that is not (postgres://…) is a connection string written where a variable’s name belongs, which the reader refuses without ever echoing it. - try_
read_ hyperdrive_ deploy try_read_hyperdrive_deploy_with, readingbynk.tomlfrom disk.- try_
read_ hyperdrive_ deploy_ with - Read
bynk.toml’s[deploy.hyperdrive]entries, honouringoverlay. No manifest, or none of the table, is empty. - try_
read_ hyperdrive_ dev try_read_hyperdrive_dev_with, readingbynk.tomlfrom disk.- try_
read_ hyperdrive_ dev_ with - Read
bynk.toml’s[dev.hyperdrive]entries, honouringoverlay.
Type Aliases§
- Hyperdrive
Deploy Config - The
[deploy.hyperdrive]entries, by capability name. - Hyperdrive
DevConfig - The
[dev.hyperdrive]entries, by capability name: the environment variablebynk devreads each connection string from.