# Environment Settings

You may have different sets of environment variables and secrets depending on the type of environment you wish to spin up (Staging vs PR Review, for example). In order to support this use case, we support configuratble environment variable sets that can be specified when you create an environment.

### Creating an Environment Variable Set

To create an environment variable set, go to the template page and the "Env Variables" tab. Click the "New" button and specify a name for the environment variable set.

![](/files/z2yqewnroi3MTvyYEanv)

### Adding Environment Variables

Adding environment variables to the set is easy, just specify them in the format `ENV_VAR='value'` separated by newlines. The file is parsed statically, so you aren't able to use previously defined environment variables in later environment variables.

![](/files/PZQaDWpYs8PDs8MBDUXg)

### Using Environment Variable Sets

You can use environment variable sets easily when creating an environment. Just specify the relevant config when you create an environment, and all the environment variables will be usable in any build steps.

![](/files/P13uXDRQa4VIsJqgOiGJ)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.usegallery.com/resources/environments/environment-settings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
