Skip to content

Datastores

In Nullstone, a Datastore is any infrastructure used to store and interact with data or files. It includes traditional databases such as Postgresql, MySQL, Redis, Elasticsearch, and Redshift. It also includes things like S3 buckets for file storage, TLS Authority for certificates, or Datadog for centralized logging and metrics. Check out the Datastores docs for more details and a list of datastores supported out of the box.

Connect to a Datastore

From the application's Capabilities tab, click to add a new capability. To connect to a datastore that has already been configured in Nullstone, just click the Connect button and follow the prompts.

Add Datastore Capability

To create a new datastore and connect it to your application, click the Create & Connect button. You will be prompted to name your new datastore. Then you will go through the same prompts as above to connect it to your application.

Create Datastore And Connect

Select the module to use to connect the datastore to your application. In some cases, there will only be one option.

Add Datastore Capability - Select Module

Confirm your selections to add the capability. On this screen, Nullstone will display any environment variables that will be injected into your application for this datastore. There is no need to memorize or write these down, you can view them at any time on the Environment Variables tab of your application.

Add Datastore Capability - Confirmation

What Happens When You Connect a Datastore

Connecting an application to a datastore handles a number of different things for you:

Establish secure network access

By default, Nullstone modules configure datastores with no access. The datastore capability will grant your application access to the datastore over the necessary port(s).

Create Database Credentials

For some datastores such as a Postgres cluster, your application will need a database in the cluster as well as a user to access it. Nullstone will create the database, create a username/password, and inject this info into your application.

Inject Connection Information

The connection information is automatically injected into your application via environment variables so that your application can connect and interact with the datastore. By injecting these environment variables (many of which are highly sensitive), you can avoid handling them yourself. You no longer have to figure out how to store, encrypt, and inject these credentials into your application.

TIP

Both datastore connection information and credentials are stored in a secrets manager and never leave your cloud account. This provides maximum security and prevents the mishandling of credentials; malicious or accidental.

Visit the Nullstone Registry to learn more about the specifics of each datastore.

Using the Datastore

To begin using your datastore in your application, utilize the environment variables that have been injected. If you look at the Environment Variables tab for your application, you will see a list of injected environment variables like the following:

Capability Environment Variables

Refer to documentation for your specific language or framework for how to read environment variables.