Introduction
A Terraform Enterprise workspace connected to a Bitbucket Cloud repository may lose its integration if the repository's webhook is accidentally deleted from the Bitbucket UI.
This guide explains how to recreate the deleted webhook using the Terraform Enterprise user interface.
Expected Outcome
After completing this procedure, Terraform Enterprise will automatically recreate the webhook in the Bitbucket Cloud repository, restoring the VCS-driven workflow and enabling new commits to trigger runs.
Prerequisites
- A Terraform Enterprise instance connected to a Bitbucket Cloud VCS provider.
- A Terraform Enterprise workspace configured with a VCS-driven workflow connected to a Bitbucket Cloud repository.
Use Case
This procedure is for when a webhook, which connects a Terraform Enterprise workspace to a Bitbucket Cloud repository, has been manually deleted from Bitbucket, and you need to restore the connection without re-creating the workspace.
Procedure
The process involves temporarily switching the workspace workflow from VCS-driven to CLI-driven and then back to VCS-driven, which forces Terraform Enterprise to re-establish the connection and create a new webhook.
-
In the Terraform Enterprise UI, navigate to the Settings > Version Control page for the affected workspace.
-
Select the Change source button.
-
In the Change workflow modal, select CLI-driven workflow and confirm by selecting the Change workflow button.
-
After the workspace converts to a CLI-driven workflow, select Connect to a different VCS to begin re-establishing the connection.
-
Select your Bitbucket Cloud VCS provider.
-
Choose the same repository that was previously connected to the workspace.
-
Review the configuration settings and scroll to the bottom of the page. Select Update VCS settings to save the changes.
-
Verify in the Bitbucket Cloud UI that Terraform Enterprise has automatically created a new webhook in the repository's settings.