ProjectMirrorArgs

data class ProjectMirrorArgs(val enabled: Output<Boolean>? = null, val keepDivergentRefs: Output<Boolean>? = null, val onlyProtectedBranches: Output<Boolean>? = null, val project: Output<String>? = null, val url: Output<String>? = null) : ConvertibleToJava<ProjectMirrorArgs>

The gitlab.ProjectMirror resource allows to manage the lifecycle of a project mirror. This is for pushing changes to a remote repository. Pull Mirroring can be configured using a combination of the import_url, mirror, and mirror_trigger_builds properties on the gitlab.Project resource.

Destroy Behavior GitLab 14.10 introduced an API endpoint to delete a project mirror. Therefore, for GitLab 14.10 and newer the project mirror will be destroyed when the resource is destroyed. For older versions, the mirror will be disabled and the resource will be destroyed. 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.ProjectMirror;
import com.pulumi.gitlab.ProjectMirrorArgs;
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 foo = new ProjectMirror("foo", ProjectMirrorArgs.builder()
.project("1")
.url("https://username:password@github.com/org/repository.git")
.build());
}
}

Import

GitLab project mirror can be imported using an id made up of project_id:mirror_id, e.g.

$ pulumi import gitlab:index/projectMirror:ProjectMirror foo "12345:1337"

Constructors

Link copied to clipboard
constructor(enabled: Output<Boolean>? = null, keepDivergentRefs: Output<Boolean>? = null, onlyProtectedBranches: Output<Boolean>? = null, project: Output<String>? = null, url: Output<String>? = null)

Properties

Link copied to clipboard
val enabled: Output<Boolean>? = null

Determines if the mirror is enabled.

Link copied to clipboard
val keepDivergentRefs: Output<Boolean>? = null

Determines if divergent refs are skipped.

Link copied to clipboard
val onlyProtectedBranches: Output<Boolean>? = null

Determines if only protected branches are mirrored.

Link copied to clipboard
val project: Output<String>? = null

The id of the project.

Link copied to clipboard
val url: Output<String>? = null

The URL of the remote repository to be mirrored.

Functions

Link copied to clipboard
open override fun toJava(): ProjectMirrorArgs