> For the complete documentation index, see [llms.txt](https://docs.firefly.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.firefly.ai/integrations/version-control/github.md).

# GitHub

Firefly integrates with GitHub to connect your infrastructure code repositories with your cloud resources. This integration enables powerful features like tracing cloud resources back to their defining code ("Jump to Code") and automatically creating Pull Requests for newly codified resources and drift remediation.

## Prerequisites

* A GitHub account with access to your infrastructure repositories.
* Appropriate permissions to install GitHub Apps or create Personal Access Tokens.
* Repositories containing Terraform or other IaC files you want to connect to Firefly.

## Setup Procedure

1. In Firefly, click **Settings > Integrations**.
2. Click **Add New > GitHub** (under version control integrations).
3. Install the Firefly GitHub application.
4. Select your Terraform repositories or **All repositories**.
5. Click **Install & Authorize**.
6. Enter your Password and click **Confirm password**.
7. Click **Continue with GitHub**.
8. Click **Authorize Infralight**.

## GitHub Enterprise Server (via AWS PrivateLink)

If you run **GitHub Enterprise Server** (GHES) inside a private VPC that isn't reachable over the public internet, Firefly can connect to it over AWS PrivateLink — keeping all traffic between Firefly and your GHES instance on the AWS backbone, with no public exposure.

1. Set up PrivateLink connectivity between your GHES VPC and Firefly. See the [AWS PrivateLink integration guide](/integrations/aws-privatelink.md) for prerequisites and customer-side setup (NLB + VPC Endpoint Service).
2. Coordinate with your Firefly contact to configure the GHES integration against your private endpoint.

## Features Enabled

* **Jump to Code**: Trace resources in your cloud inventory back to the GitHub file and specific line that defines them.
* **Automated Pull Requests**: When Firefly codifies an unmanaged resource, it can commit the new Terraform code as a Pull Request.
* **IaC Tracking**: Firefly maintains awareness of which resources are defined in code and which are not.
* **Drift Remediation**: Firefly can detect drift between the code and the actual resources and create a Pull Request to fix it.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.firefly.ai/integrations/version-control/github.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
