How to Add a Bitbucket Server (v7.20+) VCS Provider to HCP Terraform or Terraform Enterprise
Introduction
This guide provides updated steps for adding a Bitbucket Server (v7.20.x or later) Version Control System (VCS) provider to HCP Terraform or Terraform Enterprise.
Expected Outcome
Successfully add a VCS provider connection with Bitbucket Server v7.20.x or later.
Prerequisites
- HCP Terraform or Terraform Enterprise
- Bitbucket Datacenter and Server v7.20.x or later
Use Case
The Bitbucket Datacenter and Server v7.20 release introduced OAuth 2.0 integrations. These changes affect the user interface, which no longer matches the process depicted in the standard Bitbucket Server VCS provider documentation.
Procedure
- Follow Step 1: Begin Adding a New VCS Provider from the official documentation. This step generates the Callback URL and Key you will need in Bitbucket Server.
- As an administrative user in Bitbucket Server, navigate to the Application Links administration page. You can find this in the administration sidebar or by navigating directly to the URL:
https://<BITBUCKET_INSTANCE_HOSTNAME>/plugins/servlet/applinks/listApplicationLinks - Click the Create Link button. In the dialog, select Atlassian product as the application type.
-
Enter your HCP Terraform or Terraform Enterprise URL in the text field (e.g.,
https://app.terraform.ioor your TFE hostname) and click Continue. - Return to the official documentation and complete the process starting from Step 2, item 3: Configure the new application link.