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 repositoriesname
- (Optional) Name of the Git repository to retrieve; requiresproject_id
to be specified as wellinclude_hidden
- (Optional, default: false)
DataSource without specifying any arguments will return all Git repositories of an organization.
The following attributes are exported:
-
repositories
- A list of existing projects in your Azure DevOps Organization with details about every project which includes: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 repositoryweb_url
- Url of the Git repository web viewremote_url
- HTTPS Url to clone the Git repositoryproject_id
- Project identifier to which the Git repository belongs.size
- Compressed size (bytes) of the repository.default_branch
- The ref of the default branch.