Skip to main content

Using Bot (API) Tokens in CI/CD with Atlas Pipelines

In CI/CD, Atlas Pipelines is the mechanism that allows Atlas Pro features (like migration linting and planning) to run inside your workflow. When you set up a CI job with the ariga/setup-atlas action or similar integrations, you supply a bot token (i.e., API token) as the cloud-token. This API token authenticates your workflow to log into Atlas Pro, activates Pro features, and allows the job to read and push schema changes, migrations, and state updates to the Atlas Cloud Registry. However, bot users cannot be used for local development or to access the Atlas Cloud UI.

Token Usage For Local Development

Organizations on the Enterprise plan can use bot tokens for local development. Organizations on other plans or the free trial should use personal tokens instead, which are issued by running atlas login and are limited to the users who created them.

Creating a Bot User

To create a bot user, make sure you are logged in as an administrator to you Atlas Cloud account.

Follow these steps to create a new bot user:

  1. To get to the bot management screen, click on ☰ > Settings > Bots in the left navigation. In this screen, click on the Create Bot button.

Atlas Cloud Settings

Atlas Cloud Bots Tab

  1. Give your bot a name and click Create.

Create a new Bot in Atlas Cloud

  1. Copy the token and store it in a safe place. You will not be able to see it again.

Copy Bot Token