Connect
Run the dispatcher withprovider set to fly and these variables:
FLY_API_TOKENFLY_APP_NAME
Key and permissions
FLY_API_TOKEN is a Fly.io access token (macaroon), created withfly tokens create deploy -a <app> (app-scoped) or “fly tokens create org” (org-scoped). FLY_APP_NAME is the existing Fly app the Machines are created in.
An app-scoped deploy token (fly tokens create deploy -a <app>), which Fly describes as “limited to managing a single app and its resources”, is the narrowest documented token for create/list/delete. Fly does not explicitly document Machines API exec rights for deploy tokens; a machine-exec token only runs commands and cannot create or delete. An org-scoped token works but covers every app in the org. Do not use the short-lived “fly auth token”.
Sources: docs.fly.io: tokens, docs.fly.io: fly tokens create deploy, docs.fly.io: execute command, docs.fly.io: machine sizing.
Limits
- Memory limits: up to 2 GB per shared CPU or 8 GB per performance CPU; minimum 2048 MB per performance CPU, with memory in multiples of 256 MB (shared) or 2048 MB (performance). (source)
- Deploy tokens are valid for 20 years by default (set
--expiry). (source)