The gitlab_repository_tree
data source allows details of directories and files in a repository to be retrieved.
Upstream API: GitLab REST API docs
data "gitlab_repository_tree" "this" {
project = "example"
ref = "main"
path = "ExampleSubFolder"
recursive = true
}
project
(String) The ID or full path of the project owned by the authenticated user.ref
(String) The name of a repository branch or tag.path
(String) The path inside repository. Used to get content of subdirectories.recursive
(Boolean) Boolean value used to get a recursive tree (false by default).id
(String) The ID of this resource.tree
(List of Object) The list of files/directories returned by the search (see below for nested schema)tree
Read-Only:
id
(String)mode
(String)name
(String)path
(String)type
(String)