layout | page_title | description |
---|---|---|
azuredevops |
AzureDevops: azuredevops_git_repositories |
Use this data source to access information about existing Git Repositories within Azure DevOps. |
Use this data source to access information about multiple existing Git Repositories within Azure DevOps.
To read informations about a single Git Repository use the data source azuredevops_git_repository
data "azuredevops_project" "example" {
name = "Example Project"
}
# Load all Git repositories of a project, which are accessible for the current user
data "azuredevops_git_repositories" "example-all-repos" {
project_id = data.azuredevops_project.example.id
include_hidden = true
}
# Load a specific Git repository by name
data "azuredevops_git_repositories" "example-single-repo" {
project_id = data.azuredevops_project.example.id
name = "Example Repository"
}
The following arguments are supported:
-
project_id
- (Optional) ID of project to list Git repositories -
name
- (Optional) Name of the Git repository to retrieve; requiresproject_id
to be specified as well -
include_hidden
- (Optional) Defaults tofalse
.
DataSource without specifying any arguments will return all Git repositories of an organization.
The following attributes are exported:
repositories
- Arepositories
blocks as documented below. A list of existing projects in your Azure DevOps Organization with details about every project.
A repositories
block supports the following:
-
id
- Git repository identifier. -
name
- Git repository name. -
url
- Details REST API endpoint for the Git Repository. -
ssh_url
- SSH Url to clone the Git repository -
web_url
- Url of the Git repository web view -
remote_url
- HTTPS Url to clone the Git repository -
project_id
- Project identifier to which the Git repository belongs. -
size
- Compressed size (bytes) of the repository. -
default_branch
- The ref of the default branch. -
disabled
- Is the repository disabled?
The timeouts
block allows you to specify timeouts for certain actions:
read
- (Defaults to 10 minute) Used when retrieving the Git Repositories.