> For the complete documentation index, see [llms.txt](https://doc.wearepatchworks.com/product-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.wearepatchworks.com/product-documentation/virtual-environments/implementing-virtual-environments/configuring-a-virtual-environment-version.md).

# Configuring a virtual environment version

## Introduction

To configure a virtual environment, you [define a set of replacement rules](/product-documentation/virtual-environments/implementing-virtual-environments/configuring-a-virtual-environment-version/configuring-virtual-environment-replacements.md) for components used in any process flows that run in the environment. For example:

* *If a process flow running in this environment includes Connector Instance X, then replace Connector Instance X with Connector Instance Y.*
* *If a script running in this environment includes Script X, then replace Script X with Script Y.*

These replacements are configured in a virtual environment [version](/product-documentation/virtual-environments/implementing-virtual-environments/configuring-a-virtual-environment-version/understanding-virtual-environment-versions.md), and each version has its own lifecycle.

To start, you add your required replacements to a `draft` version; when you're ready, the draft version is `deployed`, and if the existing `deployed` version is updated, it becomes `inactive`. For detailed information about this lifecycle, please refer to [Understanding virtual environment versions](/product-documentation/virtual-environments/implementing-virtual-environments/configuring-a-virtual-environment-version/understanding-virtual-environment-versions.md).

## Accessing the draft version for a new virtual environment

Having [created a virtual environment](/product-documentation/virtual-environments/implementing-virtual-environments/creating-a-virtual-environment.md), a `draft` version is generated automatically, ready for you to configure. To configure this draft with your required replacements, follow the steps below.

{% stepper %}
{% step %}
**Open the draft version**

If you're not already working in the required virtual environment, [log in to the dashboard](https://app.wearepatchworks.com/virtual-environments) and select `virtual environments` | `overview` from the left-hand navigation menu, then select the environment to update.
{% endstep %}

{% step %}
**Select the draft version**

Move down to the `versions` panel and click `id` associated with the `draft` version - for example:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2Fuu04YEaHWBkby7e05aNB%2Fselect%20draft%20version%200.png?alt=media&amp;token=835c7f83-e8e3-4053-9ed3-d48370cdfc3f" alt="" width="375"><figcaption></figcaption></figure></div>

Alternatively, click the ellipsis associated with the draft version and select edit configuration - for example:

<figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FiH1H22e9caI1ktMoy93o%2Fselect%20draft%20version%201.png?alt=media&amp;token=25c2eb9c-3772-450a-9da6-ff059a91996a" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Configure replacements for the draft version**

You can now [configure replacement components](/product-documentation/virtual-environments/implementing-virtual-environments/configuring-a-virtual-environment-version/configuring-virtual-environment-replacements.md) for this version.

{% hint style="info" %}
These instructions assume that you're accessing an existing `draft` version, having just [created a new virtual environment](/product-documentation/virtual-environments/implementing-virtual-environments/creating-a-virtual-environment.md). However, if you're updating an existing virtual environment, you might want to create a new draft - in this case, please refer to [Updating a virtual environment version](/product-documentation/virtual-environments/managing-virtual-environments-versions-and-flows/managing-virtual-environment-configuration-versions/updating-a-virtual-environment-version.md).
{% endhint %}
{% endstep %}
{% endstepper %}
