The gitlab_service_github
resource allows to manage the lifecycle of a project integration with GitHub.
resource "gitlab_project" "awesome_project" {
name = "awesome_project"
description = "My awesome project."
visibility_level = "public"
}
resource "gitlab_service_github" "github" {
project = gitlab_project.awesome_project.id
token = "REDACTED"
repository_url = "https://github.com/gitlabhq/terraform-provider-gitlab"
}
project
(String) ID of the project you want to activate integration on.repository_url
(String) The URL of the GitHub repo to integrate with, e,g, https://github.com/gitlabhq/terraform-provider-gitlab.token
(String, Sensitive) A GitHub personal access token with at least repo:status
scope.static_context
(Boolean) Append instance name instead of branch to the status. Must enable to set a GitLab status check as _required_ in GitHub. See [Static / dynamic status check names] to learn more.active
(Boolean) Whether the integration is active.created_at
(String) Create time.id
(String) The ID of this resource.title
(String) Title.updated_at
(String) Update time.Import is supported using the following syntax:
# You can import a gitlab_service_github state using `terraform import <resource> <project_id>`:
terraform import gitlab_service_github.github 1