Skip to content

Latest commit

 

History

History
64 lines (36 loc) · 4.05 KB

github-enterprise.md

File metadata and controls

64 lines (36 loc) · 4.05 KB

Github Enterprise

To use Terrakube’s VCS features with a self-hosted GitHub Enterprise, follow these instructions. For GitHub.com, see the separate instructions.

{% hint style="info" %} Manage VCS Providers permission is required to perform this action, please check team-management.md for more info. {% endhint %}

  • Got to the organization settings you want to configure. Select the VCS Providers on the left menu and click the Add VCS provider button on the top right corner..

{% hint style="info" %} If you prefer, you can add a new VCS Provider directly from the Create workspace or Create Module screen. {% endhint %}

  • Click the Github button and then click the Github Enterprise option.

  • On the next screen, enter the following information about your Github Enterprise instance:
Field Value
HTTP URLhttps://<GITHUB INSTANCE HOSTNAME>
API URLhttps://<GITHUB INSTANCE HOSTNAME>/api/v3

  • Use a different browser tab to access your GitHub Enterprise instance and sign in with the account that you want Terrakube to use. You should use a service user account for your organization, but you can also use a personal account.

{% hint style="info" %} Note: The account that connects Terrakube with your GitHub Enterprise instance needs to have admin rights to any shared Terraform configuration repositories. This is because creating webhooks requires admin permissions. {% endhint %}

  • Navigate to GitHub's Register a New OAuth Application page. This page is located at https://<GITHUB INSTANCE HOSTNAME>/settings/applications/new
  • In the Github Enterprise page, complete the required fields and click Register application
FieldDescription
Application NameYour application name, for example you can use your organization name.
Homepage URLThe url for your application or website,
Application DescriptionAny description you choice
Authorization Callback URLCopy the callback url from the Terrakube UI

{% hint style="info" %} You can complete the fields using the information suggested by terrakube in the VCS provider screen {% endhint %}

Next, generate a new client secret

Copy the Client Id and Client Secret from Github Enterprise and go back to Terrakube to complete the required information. Then, click the Connect and Continue button

You will be redirected to Github Enterprise. Click the Authorize button to complete the connection.

When the connection is successful, you will go back to the VCS provider’s page in your organization. You will see the connection status, the date, and the user who made the connection.

You can now use the connection for your workspaces and modules.