GitHub

Preview logo
Note:

This is a preview feature. The preview tag is used in the Turbonomic UI to indicate that features have limited functionality and are subject to change.

Use version control systems, such as GitHub to discover the repositories that contain Terraform code (HCL). When the GitHub is added as a target, Turbonomic discovers the repositories found in the organization and shows it under the Repository entity type in the supply chain.

Adding a version control system target and granting access to Terraform state will:
  • Enable Turbonomic to discover and correlate Terraform-managed resources with their live deployments.

  • Enrich entities and optimization actions with code-context, for example GitHub repository.

  • Allow users to filter and group entities and view actions with code attributes, such as: managed by terraform; repository; or workspace.

  • Provide direct links from actions to the relevant code repository, enabling faster remediation and drift resolution.

  • Support automated or manual execution of optimization actions with full traceability and governance.

Note: In order realize the value afforded by this feature, add GitHub as a target and grant access to at least one Terraform state location.

Prerequisites

  • Permission required to access organization and repositories
  • GitHub App or Personal access token

Adding a GitHub target

  1. Navigate to Settings > Target configuration.

  2. On the Target configuration page, click Add Target.

  3. On the Select target page, click GitHub, which is shown under Infrastructure as code (IaC) section.

  4. In the side panel, review the connection requirements and then click Connect Target.

  5. On the Connection overview page, configure the following setting(s):

    • Display name

      Specify a name that uniquely identifies this connection.

      This name is for display purposes only and does not need to match any name in GitHub.

    • Address

      URL to the GitHub organization.

    • Authentication method

      • Personal access token

        Create a new personal access token if you have not created one already:
        • Within your GitHub account, click Profile > Settings.
        • Click Developer settings > Personal access tokens.
        • Select Tokens (classic).
        • Click Generate new token > Generate new token (classic).
        • Select repo so Turbonomic can search for Terraform related repositories.
        • Click Generate token.
      • GitHub App

        • GitHub App ID

          A unique identifier for your registered GitHub App.

        • GitHub private key

          Key used for authentication within GitHub.

      Use the following steps to use GitHub App as the authentication method:
      • Within your GitHub account, click Organization > Settings.
      • Expand Developer settings > GitHub Apps.
      • Click New GitHub App.
      • Provide a name for your GitHub App.
      • Add the URL for your GitHub App's website.
      • Select your preferred setting for where the GitHub App should be installed.
      • Click Create GitHub App. Copy the value for App ID.
      • Click Generate a private key. A file with .pem extension is downloaded.
      • Open the .pem file and copy the private key.
      • Within your created GitHub App, click Install App > Install to install the app in your organization.

        You can now use the App ID and private key to complete the authentication in GitHub Target connection.

When the GitHub target is successfully added, Repository entity appears in the supply chain. To relate the discovered repositories to other supply chain entities, look for Grant access actions in Action center or when scoped to a repository, to add credentials to read Terraform state.

Use the Search feature within Turbonomic to search for the discovered repositories.

Entity mapping

After it validates your targets, Turbonomic updates the supply chain with the entities that it discovered. The following table describes the entity mapping between the target and Turbonomic.

GitHub Turbonomic
Repository Repository

Actions

Turbonomic supports the following actions: