Skip to main content

Environments

Create Environments in Retool Resources

This lab focuses on creating Environments within Retool Resources. Environments provide a way to separate different data/endpoints so that Retool is using the appropriate data in the appropriate environments.

The following laboratory will use to separate endpoints running in Amazon API Gateway:

EnvironmentAmazon API Gateway Endpoint
Productionhttps://rg6skkbvfe.execute-api.us-east-2.amazonaws.com/PROD/getTicketInfo
Sandboxhttps://rg6skkbvfe.execute-api.us-east-2.amazonaws.com/getTicketInfo
info

NOTE: These endpoints provide the same data / format but the Sandbox URL will return a user that includes Dummy Staging <name>.

Create Sandbox Environment

A sandbox environment is representative of a lower environment (e.g. development, testing) where data is deidentified and is safe to use for development / testing purposes.

  • Select Settings > Environments > Create environment. Specify a name, color and description as shown in the following dialog.

Env1

  • Specify a name of Sandbox and provide a description of: Sandbox environment providing development / testing support. Select Create.

Production Environment

A production environment is representative of a production environment where data can have personally identifiable information (PII) and therefore requires more restrictive controls. These controls will be performed in the Governance Best Practices Lab. A production environment should exist under environments by default for Enterprise licenses.

Create a Resource with Environments

With two environments defined, we can create a resource that uses both and specify the appropriate endpoints in the previous table.

  • From the Retool Home Page, select Resources > Create new > Resource > REST API. This will expose the configuration panel for the resource. Specify a name of Sample EDU REST API, and the production endpoint and click the Create resource button.

Env1

  • A confirmation dialog will appear, select X to close the dialog.

Env1

  • This will display the completed resource as shown below:

Env1

  • This resource shows the environment is linked to production. Select the + symbol in Environments to add Sandbox. Modify the URL to use the Sandbox URL from the previous table.

Env1

  • Select Save changes. Now two environments exist that are employed for this API.
info

NOTE: This process would be repeated for all resources Retool will access for example databases, APIs and GraphQL endpoints.

Switch Environments

Once resources and environments are configured, the administrator will need to identify what groups of users will have Use, Edit and Own access. This will be covered in the Governance Best Practices Lab. Developers can then switch the environment they are using as described in the docs.