mirror of
https://github.com/ysoftdevs/terraform-provider-bitbucketserver.git
synced 2026-03-17 23:13:47 +01:00
1.6 KiB
1.6 KiB
Resource: bitbucketserver_project_branch_permissions
Provides the ability to apply project ref restrictions to enforce branch permissions. A restriction means preventing writes on the specified branch(es) by all except a set of users and/or groups, or preventing specific operations such as branch deletion.
Example Usage
resource "bitbucketserver_project_branch_permissions" "pr_only" {
project = "MYPROJ"
repository = "repo"
ref_pattern = "refs/heads/master"
type = "pull-request-only"
}
resource "bitbucketserver_project_branch_permissions" "no_deletes" {
project = "MYPROJ"
repository = "repo"
ref_pattern = "heads/**/master"
type = "no-deletes"
exception_users = ["admin"]
exception_groups = ["group_1", "group_2"]
}
Argument Reference
project- Required. Project Key that contains target repository.repository- Required. Repository slug of target repository.ref_pattern- Required. A wildcard pattern that may match multiple branches. You must specify a valid Branch Permission Pattern.type- Required. Type of the restriction. Must be one ofpull-request-only,fast-forward-only,no-deletes,read-only.exception_users- Optional. List of usernames to whom restrictions do not apply.exception_groups- Optional. List of group names to which restrictions do not apply.exception_access_keys- Optional. List of access keys IDs to which restrictions do not apply.