» gitlab_branch_protection
This resource allows you to protect a specific branch by an access level so that the user with less access level cannot Merge/Push to the branch.
» Example Usage
resource "gitlab_branch_protection" "BranchProtect" {
project = "12345"
branch = "BranchProtected"
push_access_level = "developer"
merge_access_level = "developer"
}
» Argument Reference
The following arguments are supported:
-
project
- (Required) The id of the project. -
branch
- (Required) Name of the branch. -
push_access_level
- (Required) One of five levels of access to the project. -
merge_access_level
- (Required) One of five levels of access to the project.