2017-03-16 20:42:33 +01:00
|
|
|
---
|
2017-04-07 06:01:13 +02:00
|
|
|
layout: "enterprise"
|
|
|
|
page_title: "GitHub - VCS Integrations - Terraform Enterprise"
|
2017-03-20 19:44:03 +01:00
|
|
|
sidebar_current: "docs-enterprise-vcs-github"
|
2017-03-17 22:40:42 +01:00
|
|
|
description: |-
|
|
|
|
GitHub repositories can be integrated with Terraform Enterprise by using push command.
|
2017-03-16 20:42:33 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
# GitHub Integration
|
|
|
|
|
2017-04-07 06:01:13 +02:00
|
|
|
GitHub can be used to import Terraform configuration, automatically queuing runs
|
|
|
|
when changes are merged into a repository's default branch. Additionally, plans
|
|
|
|
are run when a pull request is created or updated. Terraform Enterprise will
|
|
|
|
update the pull request with the result of the Terraform plan providing quick
|
|
|
|
feedback on proposed changes.
|
2017-03-16 20:42:33 +01:00
|
|
|
|
|
|
|
## Setup
|
|
|
|
|
2017-04-07 06:01:13 +02:00
|
|
|
Terraform Enterprise environments are linked to individual GitHub repositories.
|
|
|
|
However, a single GitHub repository can be linked to multiple environments
|
|
|
|
allowing a single set of Terraform configuration to be used across multiple
|
|
|
|
environments.
|
2017-03-16 20:42:33 +01:00
|
|
|
|
2017-04-07 06:01:13 +02:00
|
|
|
Environments can be linked when they're initially created using the New
|
|
|
|
Environment process. Existing environments can be linked by setting GitHub
|
|
|
|
details in their **Integrations**.
|
2017-03-16 20:42:33 +01:00
|
|
|
|
2017-04-07 06:01:13 +02:00
|
|
|
To link a Terraform Enterprise environment to a GitHub repository, you need
|
|
|
|
three pieces of information:
|
2017-03-16 20:42:33 +01:00
|
|
|
|
|
|
|
- **GitHub repository** - The location of the repository being imported in the
|
|
|
|
format _username/repository_.
|
2017-04-07 06:01:13 +02:00
|
|
|
|
2017-03-16 20:42:33 +01:00
|
|
|
- **GitHub branch** - The branch from which to ingress new versions. This
|
|
|
|
defaults to the value GitHub provides as the default branch for this repository.
|
2017-04-07 06:01:13 +02:00
|
|
|
|
2017-03-16 20:42:33 +01:00
|
|
|
- **Path to directory of Terraform files** - The repository's subdirectory that
|
|
|
|
contains its terraform files. This defaults to the root of the repository.
|