Manages a generic service endpoint within Azure DevOps, which can be used to authenticate to any external git service using basic authentication via a username and password. This is mostly useful for importing private git repositories.
resource "azuredevops_project" "example" {
name = "Example Project"
visibility = "private"
version_control = "Git"
work_item_template = "Agile"
description = "Managed by Terraform"
}
resource "azuredevops_serviceendpoint_generic_git" "example" {
project_id = azuredevops_project.example.id
repository_url = "https://dev.azure.com/org/project/_git/repository"
username = "username"
password = "password"
service_endpoint_name = "Example Generic Git"
description = "Managed by Terraform"
}
The following arguments are supported:
project_id
- (Required) The ID of the project.service_endpoint_name
- (Required) The name of the service endpoint.repository_url
- (Required) The URL of the repository associated with the service endpoint.username
- (Optional) The username used to authenticate to the git repository.password
- (Optional) The PAT or password used to authenticate to the git repository.description
- (Optional) The Service Endpoint description. Defaults to Managed by Terraform
.enable_pipelines_access
- (Optional) A value indicating whether or not to attempt accessing this git server from Azure Pipelines.The following attributes are exported:
id
- The ID of the service endpoint.project_id
- The ID of the project.service_endpoint_name
- The name of the service endpoint.enable_pipelines_access
- A value indicating whether or not to attempt accessing this git server from Azure Pipelines.Azure DevOps Service Endpoint Generic Git can be imported using projectID/serviceEndpointID or projectName/serviceEndpointID
terraform import azuredevops_serviceendpoint_generic_git.example 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000