How To Run A Connector Function in Multiple Environments
  • 20 Jun 2024
  • 3 Minutes to read
  • Contributors

How To Run A Connector Function in Multiple Environments

Article summary

Understand how to create test production, testing and development environments for Connectors.

How To Run A Connector Function in Multiple Environments

When you are testing your connector functions in "Development" mode of an app, you may not want to make updates to your production database or another source of truth.

For example, let's say you are using the Tulip Player on your computer to test a Trigger that runs a connector function with a POST request. You may not want to be adding test data to your production database.

Instead, you may want to run the connector function with a test database. You can use "Environments" in Tulip to accomplish this.

Environments allow you to run the same connector functions on different databases/services, depending on the lifecycle phase of the app.

In other words, when you run an app in development mode, a connector function will automatically run on your testing or development environment.

To enable multiple connector environments on your account, navigate to the Connectors tab via the Account Settings page of your Instance. Toggle the switch under "Allow Selection of Connector Environment in Developer Mode".

Toggle Connector Environments.gif

Setting Up Multiple Environments

After you create a new SQL or HTTP Connector, you will see a screen like this.


By default, only the "Production" environment will be configured, and the "Development" and "Pre-Production" will be configured to match production.


How Environments are Used

Based on the place where in application is run, and the state of that application, different environments will be used.

Within Developer Mode, the environment can be overwritten (see details here), but within Tulip Player, the environment used will be entirely drive by the phase in the app lifecycle.

Development - When the development version of an application is used (in player or dev mode), the configuration of the Development environment will be used.

Pre-Production - When an application has been submitted for approvals, but has not been approved, the "Pre-Production" environment configuration will be used.

Production - When an application has been published, the production environment will be used.


Further Reading

Was this article helpful?