ProjectLevelMrApprovalsArgs

data class ProjectLevelMrApprovalsArgs(val disableOverridingApproversPerMergeRequest: Output<Boolean>? = null, val mergeRequestsAuthorApproval: Output<Boolean>? = null, val mergeRequestsDisableCommittersApproval: Output<Boolean>? = null, val project: Output<String>? = null, val requirePasswordToApprove: Output<Boolean>? = null, val resetApprovalsOnPush: Output<Boolean>? = null, val selectiveCodeOwnerRemovals: Output<Boolean>? = null) : ConvertibleToJava<ProjectLevelMrApprovalsArgs>

The gitlab_project_level_mr_approval_rule resource allows to manage the lifecycle of a Merge Request-level approval rule.

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.ProjectLevelMrApprovals;
import com.pulumi.gitlab.ProjectLevelMrApprovalsArgs;
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 fooProject = new Project("fooProject", ProjectArgs.builder()
.description("My example project")
.build());
var fooProjectLevelMrApprovals = new ProjectLevelMrApprovals("fooProjectLevelMrApprovals", ProjectLevelMrApprovalsArgs.builder()
.project(fooProject.id())
.resetApprovalsOnPush(true)
.disableOverridingApproversPerMergeRequest(false)
.mergeRequestsAuthorApproval(false)
.mergeRequestsDisableCommittersApproval(true)
.build());
}
}

Import

$ pulumi import gitlab:index/projectLevelMrApprovals:ProjectLevelMrApprovals You can import an approval configuration state using `<resource> <project_id>`.

For example

$ pulumi import gitlab:index/projectLevelMrApprovals:ProjectLevelMrApprovals foo 1234

Constructors

Link copied to clipboard
fun ProjectLevelMrApprovalsArgs(disableOverridingApproversPerMergeRequest: Output<Boolean>? = null, mergeRequestsAuthorApproval: Output<Boolean>? = null, mergeRequestsDisableCommittersApproval: Output<Boolean>? = null, project: Output<String>? = null, requirePasswordToApprove: Output<Boolean>? = null, resetApprovalsOnPush: Output<Boolean>? = null, selectiveCodeOwnerRemovals: Output<Boolean>? = null)

Functions

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

Properties

Set to true to disable overriding approvers per merge request.

Link copied to clipboard

Set to true to allow merge requests authors to approve their own merge requests.

Link copied to clipboard

Set to true to allow merge requests committers to approve their own merge requests.

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

The ID or URL-encoded path of a project to change MR approval configuration.

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

Set to true to require authentication to approve merge requests.

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

Set to true to remove all approvals in a merge request when new commits are pushed to its source branch. Default is true.

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

Reset approvals from Code Owners if their files changed. Can be enabled only if resetapprovalson_push is disabled.