Resources let you connect to databases, APIs, and other external systems.
Resources in Airplane allow you to easily configure connections to external systems like databases and APIs and use them in your tasks and runbooks. Currently, Airplane supports PostgreSQL, MySQL, REST APIs, SendGrid, Mailgun, and SMTP.
To create and manage resources, you must be a team admin. Visit the resources settings page to add a new resource:
For details on each specific resource, see below:
Using resources in sessions
Resources can be used in sessions.
For example, once a database resource like Postgres has been configured, you can start a new session, add a SQL block, and run queries using it:
That's all you have to do—Airplane will handle securely passing the connection information to the agent running the query.
Using resources in tasks
Depending on the resource type, different task types support using resources as well.
When creating a SQL task you can select a database resource to query against:
When you create a REST task, you can select a REST API. The REST API's base URL will be used, as well as any headers specified on the resource:
Resources aren't yet supported for custom tasks, but support for them is planned! You will eventually be able to attach resource values to environment variables passed to the task.