Service Github
The gitlab.ServiceGithub
resource allows to manage the lifecycle of a project integration with GitHub.
This resource requires a GitLab Enterprise instance. Upstream API: GitLab REST API docs
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.Project;
import com.pulumi.gitlab.ProjectArgs;
import com.pulumi.gitlab.ServiceGithub;
import com.pulumi.gitlab.ServiceGithubArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var awesomeProject = new Project("awesomeProject", ProjectArgs.builder()
.description("My awesome project.")
.visibilityLevel("public")
.build());
var github = new ServiceGithub("github", ServiceGithubArgs.builder()
.project(awesomeProject.id())
.token("REDACTED")
.repositoryUrl("https://github.com/gitlabhq/terraform-provider-gitlab")
.build());
}
}
Content copied to clipboard
Import
$ pulumi import gitlab:index/serviceGithub:ServiceGithub You can import a service_github state using `<resource> <project_id>`
Content copied to clipboard
$ pulumi import gitlab:index/serviceGithub:ServiceGithub github 1
Content copied to clipboard
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
The URL of the GitHub repo to integrate with, e,g, https://github.com/gitlabhq/terraform-provider-gitlab.
Link copied to clipboard
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.