ProjectLevelMrApprovalsArgs

data class ProjectLevelMrApprovalsArgs(val disableOverridingApproversPerMergeRequest: Output<Boolean>? = null, val mergeRequestsAuthorApproval: Output<Boolean>? = null, val mergeRequestsDisableCommittersApproval: Output<Boolean>? = null, val projectId: Output<Int>? = null, val requirePasswordToApprove: Output<Boolean>? = null, val resetApprovalsOnPush: 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()
.projectId(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
constructor(disableOverridingApproversPerMergeRequest: Output<Boolean>? = null, mergeRequestsAuthorApproval: Output<Boolean>? = null, mergeRequestsDisableCommittersApproval: Output<Boolean>? = null, projectId: Output<Int>? = null, requirePasswordToApprove: Output<Boolean>? = null, resetApprovalsOnPush: Output<Boolean>? = null)

Properties

By default, users are able to edit the approval rules in merge requests. If set to true,

Link copied to clipboard

Set to true if you want to allow merge request authors to self-approve merge requests. Authors

Link copied to clipboard

Set to true if you want to prevent approval of merge requests by merge request committers.

Link copied to clipboard
val projectId: Output<Int>? = null

The ID of the project to change MR approval configuration.

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

Set to true if you want to require authentication when approving a merge request.

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

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

Functions

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