Recipe for the official PostgreSQL apt repository resource fields (Debian/Ubuntu).
Alpine ships PostgreSQL in its own repos (no third-party repo), so there is no
Alpine analogue of this — recipe_alpine_postgres.ts instead supplies the
cluster-init the apk package omits (alpine_postgres_setup).
postgres_apt_repo builds the apt_repo payload (minus id/name) for the
PostgreSQL Global Development Group's apt repository. The GPG key URL, the key's
pin (PGDG_KEY_BLAKE3), and the deb source line are constants; the on-disk key +
list paths vary by host convention (/usr/share/keyrings on a server;
/usr/share/postgresql-common/pgdg where PGDG's own install script put it), so
they're parameters defaulting to the /usr/share/keyrings convention.
Recipes are imported at config eval time inside zap's sandboxed config eval
(fgro eval), which has no network, no writes, and no environment, and where
the clock and randomness throw. This module is therefore a pure function: it only assembles an
object from its arguments — no I/O, no clock, no randomness, no imports beyond
types. The output is deterministic for given inputs, so it stays a reliable
content-addressed plan artifact.
The caller spreads the result into an apt_repo resource, e.g.
zap.apt_repo({id: 'postgresql-repo', name: '...', ...postgres_apt_repo(), depends_on: ['curl']}).