Github App

This feature is supported from Terrakube 2.23.0

For using repositories from GitHub.com with Terrakube workspaces and modules you will need to follow these steps:

Manage VCS Providers permission is required to perform this action, please check Team Management for more info.

Navigate to the desired organization and click the Settings button, then on the left menu select VCS Providers

Select the option for Github App

In the next page click https://github.com/settings/apps/new to create a new application adding the required information

Complete the information like the following:

Disable webhook option.

Grant the require repository, organization or account permissions and in which type of account you will do the installation.

Add "Contents" with "Read-Only"

Add "Webhooks" with "Read and Write"

Webhooks are need it if you will create workspace with webhooks enabled

Add "Commit statuses" to "Read and write"

Finally click "Create Github App"

After creating the application you need to copy the APP Id to the Terrakube UI

Scroll down and search for "Generate Private Key" and generate a new private key.

After downloading the private key we need to to transform the key to PKCS8 using the following command:

openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in my-terrakube-app.private-key.pem -out pkcs8.key

The above command assumes the downloaded key from github name is "my-terrakube-app.private-key.pem" and that you want to save the key to a file called "kcs8.key"

Now we can add the private key in the Terrakube UI.

The github app will be added to Terrakube and will be shown like this:

The final step will be to install the application to your Github account like this.

And select which repositories will be used with terrakube

The installation should look like this

Now to use the Github Application when creating a new workspace we just need to add our new connection.

Last updated