Setting up environment variables

Some of the non-critical variables, such as the test database host and username, are easy to deal with in code or configuration files that are tracked in version control (such as .circleci/config.yml). When we turn our attention to deployments, however, there are inevitably variables that you would prefer to keep secret and never check into version control.

In cases like this, we can add variables via CircleCI from the Build Settings | Environment Variables section. In the following screenshot, you can see how I'm setting the database password for the PostgreSQL RDS instance:

As a quick review of how this entire ...

Get Serverless Design Patterns and Best Practices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.