Serialization
The fly lexicon serializes resources into the JSON create bodies the Machines API (“flaps”) accepts.
Building
Section titled “Building”Each declared resource becomes a single flaps request keyed by its logical name:
{ "web": { "endpoint": "/v1/apps/my-app/machines", "method": "POST", "body": { "name": "web", "region": "iad", "config": { ... } } }}- An
AppbecomesPOST /v1/apps { app_name, org_slug? }. - A
MachinebecomesPOST /v1/apps/{app}/machineswith the fullMachineConfigasconfig. The owning app is a URL path segment, not a body field. Volume,IPAddress,Certificate, andSecretare app-scoped and POST under their app.
Every serialized machine carries the managed-by: chant ownership marker in config.metadata, which the owned-only prune reads back.
Applying
Section titled “Applying”The output is applied against flaps directly (or the mudflaps emulator offline). Endpoint and auth come from FLY_FLAPS_BASE_URL and FLY_API_TOKEN.