ListSecrets
Source:
src/Fly/ListSecrets.ts
List Fly.io App secrets. Scoped to an App. Fly’s list API
is GET /apps/{app}/secrets, not a single Secret.
List this App
Section titled “List this App”The App is fixed by ListSecrets(app). Calls take no app_name.
Provide ListSecretsHttp.
Plaintext is only returned from inside a Machine in the same App. From a deploy-time Action you get metadata (name, digest, timestamps).
const list = yield* Fly.ListSecrets(Site);const { secrets } = yield* list();List another App
Section titled “List another App”From an Action, the org FLY_API_TOKEN can list any App in the
org. ListSecrets(other) is how you reach across Apps.
From a Machine, deploy tokens are per-App. Mixing Apps on one host
shares one FLY_API_TOKEN and is not supported.
const Seed = Alchemy.Action( "Seed", Effect.gen(function* () { const list = yield* Fly.ListSecrets(Other);
return Effect.fn(function* () { const { secrets } = yield* list(); return secrets; }); }).pipe(Effect.provide(Fly.ListSecretsHttp)),);