Updating attached Terraform Modules
Updating Terraform Modules attached to Environments
Note
If you haven't yet attached a Terraform module to an environment, you can do this by following the steps in this article.
Bunnyshell manages Terraform Modules and the attachments in different ways. While Terraform Modules are automatically updated with every push performed in your Git repository, attachments are synced in a different manner to protect your environments from changes that might break them.
How to Auto-sync your Terraform Attachments
Terraform attachments are not automatically updated every time you perform a push command in your Git repository. This is because some of the changes brought may invalidate the module and may have unwanted effects on your environments.
Note
It is recommended to sync your attached Terraform modules manually.
- Select the environment where the module is attached.
- Select Terraform modules.
- Click the Actions button corresponding to your module and select Sync.
Nevertheless, Bunnyshell implemented an Auto-sync feature that allows you to automatically implement only those updates that do not invalidate the Terraform module.
Note
Updates that lead to the module being invalidated will not be performed on the attachment even if Auto-sync is ON.
You can activate the auto-sync feature when you attach the module to an environment. Simply set the Auto-sync switch to ON when selecting the module you want to attach.

Note
Alternatively, you can activate the auto-sync feature by following these steps:
- Select the environment where the module is attached.
- On the left side of the main interface, select Terraform modules.
- The modules attached to that particular environment are now displayed. Set the switch under Auto-sync to ON.
Sync Status
You can check if an attached Terraform module is synced by following these steps:
-
Select the environment where the module is attached.
-
Observe the Terraform Module Component. If it is out-of-sync, an orange Icon with an arrow pointing down will be present.

Terraform Module Status
Depending on what action you performed, you can see one of the following values as the Status of the Terraform Module Component:
- Ready: the module is attached and functional but the environment hasn't been deployed.
- Applied: the module is attached and functional and the environment has been deployed at least once. An update to the module will change its status from Applied to Ready.
- Syncing: this status indicates that a push command has been performed in your Git repository and Bunnyshell is currently updating your module.
- Applying: this status indicates that the environment is currently being deployed and the Terraform module is applied.
- Deleting: indicates that user chose to Detach the Terraform module from the environment. The user can choose to keep or delete the resources created by Terraform.
- Delete failed: indicated when the module could not be detached.
- Git connection failed: indicated when the module's connection with the Git repo fails. Possible causes can be an expired token or the repo being unreachable because of various reasons.
Updated 4 months ago