gitlab_project_protected_branch (Data Source)

The gitlab_project_protected_branch data source allows details of a protected branch to be retrieved by its name and the project it belongs to.

Upstream API: GitLab REST API docs

Example Usage

data "gitlab_project_protected_branch" "example" {
  project_id = 30
  name       = "main"
}

data "gitlab_project_protected_branch" "example" {
  project_id = "foo/bar/baz"
  name       = "main"
}

Schema

Required

Optional

Read-Only

Nested Schema for merge_access_levels

Optional:

Read-Only:

Nested Schema for push_access_levels

Optional:

Read-Only: