# 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**.

## 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.
