create_database
Provisions a managed Postgres or Redis database for your app, returning immediately while it builds. Poll list_databases until ready, then connect an app through a [db.] binding.
Instructions
Provision a managed database (kind=database workload).
Provisioning is asynchronous: the call returns immediately with the
database row in ``building`` while the daemon pulls the image off-tick
and launches the server; poll ``list_databases`` (or ``get_service``)
until ``db_ready`` is true. Lifecycle (stop / restart / delete) goes
through the existing service tools.
The daemon mints the password server-side and stores it write-only — it
is NEVER returned by this tool (key names only). An app connects to this
database by declaring a ``[db.<name>]`` binding (``provider="managed"``,
``database`` = this database's name — the ``database`` field is
required, there is no implicit default); at each launch it receives
``NERDIT_DB_<NAME>_URL``, and the ``default`` binding also sets
``DATABASE_URL`` (Postgres) or ``REDIS_URL`` (Redis) with the composed
DSN so an unmodified client library connects with no code change.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Service name for the new database (lowercase DNS label, ≤ 63 chars). Omit to use the backend's own name prefix. An existing name is a conflict, not a redeploy. | |
| backend | No | Data backend to provision: ``postgres`` or ``redis``. Omit to use the daemon's ``[databases].default_backend`` (``postgres`` out of the box); an unknown value is refused, never silently defaulted. | |
| idempotency_key | No | Caller-chosen key: a retry with the same key replays the first result instead of acting twice. Omit and a fresh key is minted per call, so each call acts. |