Terrakube
Latest
Latest
  • Introduction
  • Updates
  • Getting started
    • 📐Architecture
    • 🔐Security
    • ⭐Getting Started
    • 💿Docker Images
    • 🌐Docker Compose
    • 📥Deployment
      • 🔨Helm Chart
      • 🚀Minikube
      • 🔑Minikube + HTTPS
      • ✈️Ingress Configuration
      • 🔐User Authentication (DEX)
      • 💾Storage backend
        • Azure Storage Account
        • Amazon Cloud Storage
        • Google Cloud Storage
        • Minio (S3 compatible)
      • 🛰️Database Backend
        • SQL Azure
        • PostgreSQL
        • H2
      • 🔐Custom CA Certs
      • ⚙️Custom Terraform CLI Builds
      • 👮Self-Hosted Agents
      • 🕑Ephemeral Agents
      • 📶Proxy Configuration
      • 🛡️Token Security
      • 🚦Open Telemetry
    • 🏗️Development
      • 🚀Gitpod
    • 🤵User Management
      • Azure Active Directory
      • Google Cloud Identity
      • Amazon Cognito
      • Github
      • Keycloak
  • 📓User Guide
    • Organizations
      • Creating an Organization
      • Global Variables
      • Team Management
      • API Tokens
      • Templates
        • Default Templates
        • Persistent Context
        • Import Templates
        • UI Templates
        • Filter global variables in jobs
        • Template Scheduling in Jobs
      • Tags
    • VCS Providers
      • Github OAuth
      • Github App
      • Github Enterprise
      • GitLab
      • Gitlab EE and CE
      • Bitbucket
      • Azure DevOps
      • SSH
    • Workspaces
      • Overview
      • Creating Workspaces
      • Terraform State
      • Share Workspace State
      • Provider Cache
      • Variables
      • Dynamic Provider Credentials
        • AWS Dynamic Provider Credentials
        • Azure Dynamic Provider Credentials
        • GCP Dynamic Provider Credentials
      • Workspace scheduler
      • API-driven Workflow
      • CLI-driven Workflow
      • Ephemeral Workspaces
      • Actions
        • Developing Actions
          • Quick start
          • Display Criteria
          • Action Types
          • Action Context
          • Action Proxy
        • Built-in Actions
          • Open Documentation
          • Resource Details
          • Open in Azure Portal
          • Restart Azure VM
          • Azure Monitor
          • Open AI
    • Private Registry
      • Publishing Private Modules
      • Using Private Modules
      • Using Providers
    • Policy Enforcement (OPA)
    • Cost Estimation
    • Drift Detection
    • CI/CD Integration
      • Github Actions
      • Bitbucket
    • Terrakube CLI
      • Getting started
      • Installation
      • Commands
        • terrakube login
        • terrakube logout
        • terrakube organization
          • organization list
          • organization create
          • organization update
          • organization delete
        • terrakube team
          • team list
          • team create
          • team update
          • team delete
        • terrakube workspace
          • workspace list
          • workspace create
          • workspace update
          • workspace delete
          • workspace variable
            • variable list
        • terrakube variable
          • variable update
          • variable delete
          • variable create
        • terrakube job
          • job list
          • job create
        • terrakube module
          • module list
          • module create
          • module update
          • module delete
    • Reference
      • Executor
        • Terraform Execution Flow
        • Terraform Versions
    • Migrating to Terrakube
  • 🎓Learn
    • What is Terrakube
      • Section Overview
      • Terraform in a Nutshell
      • Terraform Challenges at Enterprise Level
      • Introducing Terrakube
      • Summary and Up Next
    • Deploying using Terrakube
  • 📖API
    • 🌟Getting started
    • ⚙️Methods
      • Globalvar
      • Organization
      • Teams
      • Workspace
      • Variables
      • History
      • Jobs
      • Template
      • Schedule
      • Step
      • Module
      • Vcs
      • Provider
      • Personal Access Token
      • Team API Tokens
      • SSH Key
      • Agent
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
Export as PDF
  1. User Guide
  2. VCS Providers

Github App

PreviousGithub OAuthNextGithub Enterprise

Last updated 7 months ago

Was this helpful?

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

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.

In the next page click to create a new application adding the required information

📓
https://github.com/settings/apps/new