Terraform Modules in copied Environments
Introduction
Ephemeral environments are environments meant to be used for a limited amount of time, and then discarded.
Once you have a Primary Environment with a Terraform Module attached, you can propagate the Terraform Module to subsequent Environments:
- On-Demand Environments, manually cloned from the Primary Environment
- Ephemeral Environments, automatically created by the system
Terraform Modules and Cloned Environments
The Environment is created by cloning an existing environment and Bunnyshell also automatically clones any Terraform module attached to that particular environment.
-
Select your Environment in the Bunnyshell interface.
-
Click the Actions button and select Clone.

Terraform Modules and Ephemeral Environments
You can automatically create Ephemeral Environments very simply, by creating a Pull Request or via API integration with your current CI/CD solution.
How to automatically create Ephemeral Environments
- Select your Environment in the Bunnyshell interface.
- Click the Settings button. The settings for the selected environment are displayed.
- In the Ephemeral environments section, toggle ON the Create ephemeral environments on pull request option. This option is automatically saved by Bunnyshell.
Bunnyshell will automatically clone a Terraform Module attached to the main environment and attach it to the Ephemeral Environment as well.
You can activate this feature when you attach the module to an environment. Simply set the Auto-attach to Ephemeral Environments switch to ON when selecting the module you want to attach.

Alternatively, you can follow these steps to activate it:
- Select the environment where the module is attached.
- Select Terraform modules.
- The modules attached to that particular environment are now displayed. Click the Options button corresponding to your environment and select Edit.
- Set the Auto-attach to Ephemeral Environments switch to ON
Updated 4 months ago