gitlab_branch (Data Source)

The gitlab_branch data source allows details of a repository branch to be retrieved by its name and project.

Upstream API: GitLab REST API docs

Example Usage

# By project ID
data "gitlab_branch" "foo" {
  name    = "example"
  project = "12345"
}

# By project full path
data "gitlab_branch" "foo" {
  name    = "example"
  project = "foo/bar"
}

Schema

Required

Read-Only

Nested Schema for commit

Read-Only: