PlanetScale
Connect
Connect PlanetScale from the terminal. Pass --help for the flags PlanetScale accepts, plus --no-browser for headless environments.
polylane cloud connect --provider planetscaleOAuth authorization, or a service token from your PlanetScale organization settings.
PlanetScale connects via OAuth: click Connect with PlanetScale, authorize read access on PlanetScale, and you're redirected back with syncing already started. Tokens are encrypted before they are stored, and the agent never sees them.
Service token alternative
If you prefer a long-lived credential, connect with a service token instead:
- Open PlanetScale, go to your organization's Settings → Service tokens.
- Click Create service token and copy both the token ID and the token.
- Grant the token read access to the organization and its databases (e.g.
read_databases,read_branches). - Paste the token ID and token into Polylane.
- Polylane validates the token and starts syncing.
Polylane discovers your databases and their branches, including state, plan, region, and schema activity.
Troubleshooting
"Invalid service token" error
- Both the token ID and the token are required; the token alone cannot authenticate.
- Check that the token has not been deleted in PlanetScale's settings.
- Make sure the token has organization read access.
Missing resources
- PlanetScale can take a few minutes to sync everything.
- Trigger a manual Sync from the account header to refresh.
Disconnecting
Disconnect the account in Polylane, then delete the service token from your PlanetScale organization settings.
Tools
2Operations agents can perform in threads and automations.
Supported resources
2Resource types that show up in your infrastructure graph.
Automation triggers
3Events from PlanetScale that can start an automation.
Automation templates
1Pre-built automations that use PlanetScale. Open one to see its trigger, instructions, and actions.