page_title | subcategory | description |
---|---|---|
gitlab_service_github Resource - terraform-provider-gitlab |
The gitlab_service_github resource allows to manage the lifecycle of a project integration with GitHub.
-> This resource requires a GitLab Enterprise instance.
~> This resource is deprecated. use gitlab_integration_githubinstead!
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/integrations.html#github |
The gitlab_service_github
resource allows to manage the lifecycle of a project integration with GitHub.
-> This resource requires a GitLab Enterprise instance.
~> This resource is deprecated. use gitlab_integration_github
instead!
Upstream API: GitLab REST API docs
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 leastrepo: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.
Starting in Terraform v1.5.0 you can use an import block to import gitlab_service_github
. For example:
import {
to = gitlab_service_github.example
id = "see CLI command below for ID"
}
Import using the CLI 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